mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
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. PR-URL: https://github.com/nodejs/node/pull/16308 Fixes: https://github.com/nodejs/node/issues/16180 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
This commit is contained in:
parent
c087502758
commit
5886e204f0
6 changed files with 142 additions and 69 deletions
|
@ -55,10 +55,4 @@ function disable() {
|
|||
|
||||
exports.setup = function() {
|
||||
inspector.registerAsyncHook(enable, disable);
|
||||
|
||||
if (inspector.isEnabled()) {
|
||||
// If the inspector was already enabled via --inspect or --inspect-brk,
|
||||
// the we need to enable the async hook immediately at startup.
|
||||
enable();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue