-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Calling inspector.open() if the inspector is already available makes inspector.url() give a bad address #33012
Comments
See nodejs/node#33012 Fixes microsoft/vscode#95128 We still do remove --inspect-brk since that will break in our bootloader which entirely blocks attachment.
I guess in this case, throwing an error warning that the inspector needs to be closed before being opened again should make more sense. However this does break https://github.com/nodejs/node/blame/master/test/sequential/test-inspector-open.js @sam-github is there a particular reason |
When the user tries to activate the inspector that is already active on a different port and host, we previously just silently reset the port and host stored in the Environment without actually doing anything for that to be effective. After this patch, we throw an error telling the user to close the active inspector before invoking `inspector.open()` again. PR-URL: #33015 Fixes: #33012 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
When the user tries to activate the inspector that is already active on a different port and host, we previously just silently reset the port and host stored in the Environment without actually doing anything for that to be effective. After this patch, we throw an error telling the user to close the active inspector before invoking `inspector.open()` again. PR-URL: #33015 Fixes: #33012 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
When the user tries to activate the inspector that is already active on a different port and host, we previously just silently reset the port and host stored in the Environment without actually doing anything for that to be effective. After this patch, we throw an error telling the user to close the active inspector before invoking `inspector.open()` again. PR-URL: #33015 Fixes: #33012 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
What steps will reproduce the bug?
Create a script
foo.js
with:Run
node foo.js
✔️Run
node --inspect foo.js
❌How often does it reproduce? Is there a required condition?
100%
What do you see instead? / What is the expected behavior?
It seems like calling
inspect()
again will silently "overwrite" the existing run with an unresolved port 0. I would expect any of the following as 'good' behavior:Additional information
Ref: microsoft/vscode#95128
The text was updated successfully, but these errors were encountered: