inspector: track async stacks when necessary
With this change, we do async stack tracking only when explicitly requested by the inspector client. This avoids unnecessary overhead for clients that might not be interested in async stack traces.
Fixes: https://github.com/nodejs/node/issues/16180
In practical terms, this means that we still get async stack tracking right from startup when --inspect-brk
is used for debuggers that enable async stacks (DevTools does this by default, and I think WebStorm and others as well).
When using --inspect
, we no longer enable async stack tracking by default. The inspector client can request async stack tracking at the time of the connection. Any async resources already created will not have stack tracking. I believe this is the right behavior (see #16180 (closed)). Users needing async stack tracking right from startup can use --inspect-brk
.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
inspector