-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoAttachSmartPattern
should also apply to autoAttachChildProcesses
#1246
Comments
Good suggestion, we actually had this in early versions of this tool but never got around to reimplementing it... Would not be terribly difficult to PR if you're interested. Debugging works by the inclusion of a "bootloader" script in NODE_OPTIONS that is required before the program starts. Code that runs in the bootloader to determine if we should attach to the child process: vscode-js-debug/src/targets/node/bootloader.ts Lines 203 to 213 in 1f824e7
Code that sets the variables that the bootloader gets: vscode-js-debug/src/targets/node/nodeLauncherBase.ts Lines 301 to 318 in 1f824e7
Configuration interface where the option could be added: vscode-js-debug/src/configuration.ts Line 286 in 1f824e7
|
It’s expensive & time-consuming to automatically attach debuggers to every child process when using a task runner like
yarn
. We don’t need to attach to theyarn
process, but can end up getting a large chain of attached debuggers, when we only want to debug the leaf process.We can fix this in the integrated terminal only by configuring like so:
This prevents attaching to everything except the leaf processes that you specify, which greatly improves startup time.
However, this functionality is only enabled in the integrated terminal—nowhere else supports
autoAttachSmartPattern
.I think that we should enable
autoAttachSmartPattern
in thelaunch.json
options and it would function the same way.Apologies if I’m missing something—I pored over the docs but I couldn’t find a different way to make this work.
The text was updated successfully, but these errors were encountered: