You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add default DEBUG and VERBOSE_LOGS configuration_env_vars to nodejs_binary (#1080)
- all rules updated to use DEBUG and VERBOSE_LOGS environment variables
- added golden_debug attribute golden_file_test to support the case where a rule has different output if DEBUG is set; for example
```
golden_file_test(
name = "test",
actual = "out.min.js",
golden = "output.golden.js_",
golden_debug = "output.debug.golden.js_",
)
```
Copy file name to clipboardExpand all lines: docs/index.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,40 @@ See the `examples/program` directory in this repository.
90
90
91
91
The `examples/program/index.spec.js` file illustrates testing. Another usage is in https://github.com/angular/tsickle/blob/master/test/BUILD
92
92
93
+
### Debugging
94
+
95
+
Add the options in the `Support for debugging NodeJS tests` section from https://github.com/bazelbuild/rules_nodejs/blob/master/common.bazelrc to your project's `.bazelrc` file to add support for debugging NodeJS programs.
96
+
97
+
Using the `--config=debug` command line option with bazel will set a number of flags that are specified there are useful for debugging. See the comments under `Support for debugging NodeJS tests` for details on the flags that are set.
98
+
99
+
Use `--config=debug` with `bazel test` as follow,
100
+
101
+
```
102
+
bazel test --config=debug //test:...
103
+
```
104
+
105
+
or with `bazel run`,
106
+
107
+
```
108
+
bazel run --config=debug //test:test1
109
+
```
110
+
111
+
to also turn on the NodeJS inspector agent which will break before any user code starts. You should then see,
0 commit comments