Unbound breakpoint when using Chrome on an SSH remote Windows -> Lunix project
See original GitHub issueDescribe the bug When executing my React app (created with CRA), the breakpoints I am setting are unbound and do not get hit in VS Code.
However, adding debugger
statements to the code will drop me into VS code and allow me to step through the process. One thing I have noticed is that when I drop to code on a debugger statement I am in a compiled main.chunk.js
file rather than my expected component file.
I use a Windows machine to a remote Linux box using the SSH remote VS code extension. I run npm start
on the command line to start the React application and then F5 to run my debugger process.
My launch configuration is below:
{ "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://${env:SWA_DEV_SYSTEM_IP}:3000", "webRoot": "${workspaceFolder}/src", "trace": true } ] }
I have log files attached. v0 is without the debugger
statement, v1 is with it.
To Reproduce I was able to replicate this on a split new CRA app.
- On a linux system, use
create-react-app
to create a new base application. - On Windows, open VS code and connect to the application directory using the SSH remote functionality
- At the linux command line,
npm start
the application - Ensure that your
launch.json
has the correct IP address for your app server and is mapped to the/src
directory. - Place a breakpoint in App.js (for example)
- F5 to launch Chrome
- The breakpoint will not be hit
Log File
vscode-debugadapter-0.json.gz vscode-debugadapter-1.json.gz
VS Code Version: 1.49.2 (user setup)
Happy to provide any more detail as required.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Oh yes, restarting the server is necessary. I missed that this was remote.
Seems that a server reboot means that the process is now picking up the
no_proxy
env variable I set in.bashrc
.The debugger is now picking things up correctly!
Thank you @connor4312 and @roblourens for the advice, appreciate it!!