Skip to content

Commit 7d35eb6

Browse files
authored
Improve instructions for debugging. (#4390)
1 parent e8b5f26 commit 7d35eb6

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

build_runner/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.12.3-wip
2+
3+
- Improved debugging instructions in README.md.
4+
15
## 2.12.2
26

37
- Bug fix: don't crash if `applies_builders` in `build.yaml` mentions an

build_runner/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,21 @@ For testing builders, see the [`build_test` package](https://pub.dev/packages/bu
216216

217217
## Debugging builds
218218

219-
To debug the build process, note that `build_runner` spawns a child process to run
220-
the build.
221-
Options used to spawn this process can be customized, which allows attaching a debugger:
219+
To debug the build process, note that `build_runner` spawns a child process to
220+
run the build. So, the args that turn on debugging must be passed through
221+
`build_runner` to the child process using `--dart-jit-vm-arg`, for example:
222222

223223
```shell
224224
dart run build_runner build --dart-jit-vm-arg=--observe --dart-jit-vm-arg=--pause-isolates-on-start
225225
```
226+
227+
The args in the example will cause the child process to output a URL for debugging:
228+
229+
```
230+
The Dart DevTools debugger and profiler is available at:
231+
http://127.0.0.1:8181/3xXtAPE8msc=/devtools/?uri=ws://127.0.0.1:8181/3xXtAPE8msc=/ws
232+
```
233+
234+
To use your IDE to debug, launch a "remote debug" session. For example in
235+
VSCode the remote debug action is called "Debug: Attach to Dart Process". It
236+
will ask for the URL to connect to: paste in the one that was printed.

build_runner/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: build_runner
2-
version: 2.12.2
2+
version: 2.12.3-wip
33
description: A build system for Dart code generation and modular compilation.
44
repository: https://github.com/dart-lang/build/tree/master/build_runner
55
resolution: workspace

build_test/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.5.11-wip
2+
3+
- Use `build_runner` 2.12.3-wip.
4+
15
## 3.5.10
26

37
- Use `build_runner` 2.12.2.

build_test/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: build_test
22
description: Utilities for writing unit tests of Builders.
3-
version: 3.5.10
3+
version: 3.5.11-wip
44
repository: https://github.com/dart-lang/build/tree/master/build_test
55
resolution: workspace
66

@@ -10,7 +10,7 @@ environment:
1010
dependencies:
1111
build: ^4.0.0
1212
build_config: ^1.0.0
13-
build_runner: '2.12.2'
13+
build_runner: '2.12.3-wip'
1414
built_collection: ^5.1.1
1515
crypto: ^3.0.0
1616
glob: ^2.0.0

0 commit comments

Comments
 (0)