Skip to content
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

Can't debug with random ports after upgrading to vscode 1.19.0. #40254

Closed
yisiqi opened this issue Dec 15, 2017 · 4 comments
Closed

Can't debug with random ports after upgrading to vscode 1.19.0. #40254

yisiqi opened this issue Dec 15, 2017 · 4 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster

Comments

@yisiqi
Copy link

yisiqi commented Dec 15, 2017

  • VSCode Version: 1.19.0
  • OS Version: macOS 10.13.2

Steps to Reproduce:

  1. Add config to launch.json
{
      "name": "Debug Tests WebSocket",
      "type": "node",
      "request": "launch",
      "runtimeArgs": [
        "--inspect-brk",
        "${workspaceRoot}/node_modules/.bin/jest",
        "--runInBand",
        "src/websocket"
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    }
  1. Launch it.
  2. After a few seconds, got the Error info: connect ECONNREFUSED 127.0.0.1:13098

Reproduces without extensions: No

@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Dec 15, 2017
@yisiqi yisiqi changed the title Can't connect to debug port with vscode 1.19.0. Can't debug with random ports after upgrading to vscode 1.19.0. Dec 15, 2017
@yisiqi
Copy link
Author

yisiqi commented Dec 15, 2017

I just tried to set a specific port number. And it's works fine.

@isidorn isidorn assigned weinand and unassigned isidorn Dec 15, 2017
@weinand
Copy link
Contributor

weinand commented Dec 15, 2017

@yisiqi what version of node.js are you using?
I assume you are using node.js >= 8.0.

Your runtime arguments look wrong to me since all but the first are not really runtime arguments.
Try this:

{
      "name": "Debug Tests WebSocket",
      "type": "node",
      "request": "launch",
      "program": "${workspaceRoot}/node_modules/.bin/jest",
      "args": [
        "--runInBand",
        "src/websocket"
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    }

If you are using a node.js version < 8.0 but still want to use the "inspector" protocol, please add a "protocol": "inspect" to the launch config.

@weinand weinand added the info-needed Issue requires more information from poster label Dec 15, 2017
@yisiqi
Copy link
Author

yisiqi commented Dec 15, 2017

Thanks @weinand , it's works.
And I do using node.js >= 8.0. But the old launch config works fine with vscode 1.18.x. I feel a little confused.

@weinand
Copy link
Contributor

weinand commented Dec 15, 2017

The launch config was always wrong.
But luckily long standing bug #16173 made the bogus launch config work.
In VS Code 1.18 we've fixed the bug and that affected your launch config.
Sorry for that.

/cc @roblourens

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants