You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Stopping the debugger attached to a ReactJS application open in Chrome doesn't seem to release a port, Chrome then is unable to load the URL that was being debugged. Using Chrome 116.0.5845.179 and 'JavaScript Debugger (Nightly)'. Trying on a ReactJS project running from Terminal on port 3000. All on macOS Big Sur.
To Reproduce
Steps to reproduce the behavior:
Create a debug config adding to workspace.code-workspace:
Run a ReactJS app from Terminal using yarn, on port 3000:
$ yarn start
Go back to Chrome and navigate to http://localhost:3000/
Go to VSCode and run the created debugger. So far, it all works as expected.
Stop the debugger in VSCode (doesn't matter if I click the 'disconnect' icon or click the drop down and select Stop)
Go back to Chrome, the tab on https://localhost:3000/ will still be there and working (if I click Stop in the previous step, the tab is gone). But if I try to open a new tab and navigate to that same URL it doesn't load (it hangs on loading forever). The only way to make the URL open again is by restarting VSCode.
VS Code Version: 1.82.0 (Universal)
Additional context
A possible hack/workaround is to create a postDebugTaskattribute (added after "port": 9222,, in the debug configuration shown above):
"postDebugTask": "killdebugger"
And then create that global task which kills the VSCode process running on a port, adding the following to tasks.json:
This works partially (I haven't tested thoroughly): after stopping the debug and waiting for the process to be killed, Chrome can navigate once again to the localhost URL, but VSCode seems to work erratically (occasionally, other extensions don't function properly?).
Describe the bug
Stopping the debugger attached to a ReactJS application open in Chrome doesn't seem to release a port, Chrome then is unable to load the URL that was being debugged. Using Chrome 116.0.5845.179 and 'JavaScript Debugger (Nightly)'. Trying on a ReactJS project running from Terminal on port 3000. All on macOS Big Sur.
To Reproduce
Steps to reproduce the behavior:
workspace.code-workspace
:--remote-debugging-port=9222
:yarn
, on port3000
:http://localhost:3000/
Stop
)https://localhost:3000/
will still be there and working (if I clickStop
in the previous step, the tab is gone). But if I try to open a new tab and navigate to that same URL it doesn't load (it hangs on loading forever). The only way to make the URL open again is by restarting VSCode.VS Code Version: 1.82.0 (Universal)
Additional context
A possible hack/workaround is to create a
postDebugTask
attribute (added after"port": 9222,
, in the debug configuration shown above):And then create that global task which kills the VSCode process running on a port, adding the following to
tasks.json
:This works partially (I haven't tested thoroughly): after stopping the debug and waiting for the process to be killed, Chrome can navigate once again to the
localhost
URL, but VSCode seems to work erratically (occasionally, other extensions don't function properly?).This seems to be very similar to this bug: #1731
The text was updated successfully, but these errors were encountered: