Cannot attach to debugger
See original GitHub issueHope this is the right place/project, otherwise my apologies.
When debugging nodejs using attach, vscode connects to the nodejs debugger using the address specified in launch.json
However, it seems to always use “localhost” in the host header for the requests it make.
This prevents me from routing the traffic through a proxy which needs host names in order to route properly
Is there anyway to control the host header in vscode’s requests to the nodejs debugger?
Thanks
A sniffed snippet example from request vscode => nodejs debugger:
GET /json/version HTTP/1.1
user-agent: got (https://github.com/sindresorhus/got)
accept: application/json
host: localhost
accept-encoding: gzip, deflate, br
Connection: close
Another snippet from the ws upgrade request:
GET /6cabf470-7eb5-4202-b11f-4355c178c8a3 HTTP/1.1
Sec-WebSocket-Version: 13
Sec-WebSocket-Key: qDfnpxTOzSjxQfbiJcsTWQ==
Connection: Upgrade
Upgrade: websocket
host: localhost
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Unable to Attach to the Process - Visual Studio (Windows)
Run the debugger and managed application under the same user account name and password. To solve Scenario 2. From the Start menu, choose...
Read more >Visual studio debugger won't attach to chrome
I'm trying to attach to an instance of chrome running a react page, using node as a server. I want to attach to...
Read more >Cannot attach debugger to Helper app on macOS
I've got a macOS app with a "Helper" (LoginItem) app that I'd like to attach the debugger to in order to debug the...
Read more >Unable to attach to the process. The system cannot find the file ...
First go to Tool->Options->Tools for Apache Cordova->Run Dependency Checker to make sure you installed all the required components. You might ...
Read more >Node.js debugging - cannot attach debugger to subprocesses
Basically I am having trouble attaching the VS Code debugger to the subprocesses I have in my Node app. It only attaches to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the quick reply. I’ll see what I can do and create a PR for it.
This is required; if the host isn’t set to localhost then the debug target (node or chrome) will refuse to respond with debug information.
If the host header is not localhost, you will need to fix it up in your proxy. I would be willing to accept a PR to configure a custom value for the host header.