-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Debugger isn't stopped at the debugger;
statement when debugging using --inspect
#30911
Comments
So I just completed a feature of NiM that partially addresses this issue. Using the underlying devtools protocol NiM will resume the debugger (past --inspect-brk) automatically when it connects... Granted, situations where you're assigning random ports via "=0" will require more, but maybe this would help in certain other situations. |
I ran into this same problem. In the curriculum used by the Linux Foundation to prepare you for the Nodejs application developer exam, it is stated that When using One can use |
I think you can already kind of do that with a preload script: Load the |
Note: previous thread was #10457, but it got closed recommending
--inspect-brk
which is more a workaround than a solution imo.Is your feature request related to a problem? Please describe.
When debugging a CLI program, I want to break at a specific location. For DevX reasons I don't want to use
--inspect-brk
, as it would require me to attach the debugger before even knowing whether the codepath covered by the breakpoint is hit - which is particularly cumbersome when using nested processes (with--inspect-port=0
).Describe the solution you'd like
I'd like
debugger;
statements to pause the execution even if a debugger isn't attached yet; I'd then attach it myself.Describe alternatives you've considered
Pausing the process manually using
execSync
w/sleep
or similar doesn't work: the debugger doesn't see the Node process. I suspect an internal integration is required for the process to answer the debugger during a synchronous call?The text was updated successfully, but these errors were encountered: