async_hooks,inspector: inspector keeps async context untouched
This started as an observation that the async context is modified from the function where the breakpoint is defined to the Debugger.paused callback function. The debugger breakpoint handler function should be able to access the async context of the involved function.
I decided for a PR instead of an issue because it allows to make a code proposal to start the discussion. Is there anything that can cause issues with this change?
The testcase with this PR (test-inspector-async-context-brk.js
) fails without the change because the Debugger.paused
callback runs in the context available at callback creation (in this example undefined
). With this modification, the inspector is not considered an async resource and it does not create an own async context and the test passes.