-
Notifications
You must be signed in to change notification settings - Fork 30k
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 <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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 <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
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: