Skip to content

Commit

Permalink
build: allow inspecting test nodejs process w/ bazel (angular#16525)
Browse files Browse the repository at this point in the history
Adds a new `debug` configuration for Bazel that can be used to
open the Chrome Devtools Debugger in order to debug a bazel
test that runs with NodeJS. This is similar to what `angular/angular`
provides.

*Note*: This does not make debugging for web test suites easier. For
web test suites we need to find a better solution. I have something in mind
where developers can run `bazel run` instead of `bazel test` to open the
karma test suite in non-capture mode (allowing easy debugging)
  • Loading branch information
devversion authored and jelbourn committed Jul 16, 2019
1 parent cf11ed2 commit 40ad0fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,24 @@ build:remote --host_platform=//tools:rbe_platform
build:remote --platforms=//tools:rbe_platform
build:remote --extra_toolchains=@rbe_default//config:cc-toolchain

# Setup Build Event Service
# Setup Build Event Service
build:remote --bes_backend=buildeventservice.googleapis.com
build:remote --bes_timeout=30s
build:remote --bes_results_url="https://source.cloud.google.com/results/invocations/"

# Set remote caching settings
build:remote --remote_accept_cached=true

################################
# --config=debug #
################################

# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results

################################
# Local Environment Setup #
# Needs to be last statement #
################################
# Load any settings which are specific to the current user. Needs to be *last* statement
# in this config, as the user configuration should be able to overwrite flags from this file.
Expand Down

0 comments on commit 40ad0fc

Please sign in to comment.