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

Multiple debug sessions fail after a few seconds #38375

Closed
weeco opened this issue Nov 15, 2017 · 5 comments
Closed

Multiple debug sessions fail after a few seconds #38375

weeco opened this issue Nov 15, 2017 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@weeco
Copy link

weeco commented Nov 15, 2017

  • VSCode Version: 1.19.0-insider (older non insider versions as well)
  • OS Version: Win 10

I want to launch and debug two sessions at once by using VSCode's compound feature. They start absolutely fine together and I can switch between them as desired. However after a few seconds one of the applications is apparently crashing (or disconnecting the debugger) showing this error message:
https://i.imgur.com/Bs8h0E1.png

The other process keeps running. Is it possible to debug two node processes at the same time or am I doing something wrong?

That's my launch.json:

{
    "version": "0.2.0",
    "compounds": [
      {
        "name": "TokenCreator+Express",
        "configurations": [ "Token Creator", "Express Server" ]
      }
    ],
    "configurations": [
        {
          "type": "node",
          "request": "launch",
          "name": "Token Creator",
          "program": "${workspaceRoot}/src/microservices/token-creator/token-creator.ts",
          "outFiles": [
            "${workspaceRoot}/dist/**/*.js"
          ],
          "console": "integratedTerminal",
          "smartStep": true
        },
        {
            "type": "node",
            "request": "launch",
            "name": "Express Server",
            "program": "${workspaceRoot}/src/index.ts",
            "outFiles": [
                "${workspaceRoot}/dist/**/*.js"
            ],
            "console": "integratedTerminal",
            "smartStep": true,
            "runtimeArgs": [
                "--max-old-space-size=4096"
            ]
        }
    ]
}

Reproduces without extensions: Yes

In the integrated terminal I noticed it would not print any lines about starting the second application until I close the first application (which has been started first by the debugger). Basically it seems VSCode is trying to execute the "node app" command in the same powershell. Am I missing something in my configuration maybe?

@vscodebot vscodebot bot added the insiders label Nov 15, 2017
@vscodebot vscodebot bot added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 15, 2017
@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Nov 20, 2017
@weeco
Copy link
Author

weeco commented Nov 21, 2017

I was able to replicate the behavior on my Mac environment. Do you need more information or were you able to reproduce the issue yourself as well? I would be very happy to use multi debug sessions soon.

@auchenberg
Copy link
Contributor

@weeco This is most likely caused by your second launch config that's using runtimeArgs, which overrides the default runtimeArgs that puts Node into debug mode.

Try removing runtimeArgs or specify --inspect=9000 + setting port: 9000 in your config too.

@weeco
Copy link
Author

weeco commented Nov 22, 2017

@auchenberg I removed the args from the launch config but I am facing the same issue.

@irissoftworks
Copy link

irissoftworks commented Dec 3, 2017

This looks like a duplicate of #37589.

It seriously impacts node multi root workspaces, as it's not possible to debug/launch multiple node processes from the same vscode instance, when using the integrated terminal. Using the internal console is not a valid workaround, as console logging will be mixed up between processes.

Looking at the code, it seems to me the integratedTerminalInstance property is there only for this purpose (launch) and is always reused in this situation.

I can understand it might be there to try and reuse the terminal in which the same process / launch config was previously running ( when restarting the debugger ) instead of generating new terminal instances.

Think it just needs to be be restricted to the same launch config.

I think the best solution would be similar to what was implemented for tasks, if possible, #19251 with the 'shared', 'dedicated', 'new'.

@weinand
Copy link
Contributor

weinand commented Dec 3, 2017

duplicate of #37589

@weinand weinand closed this as completed Dec 3, 2017
@weinand weinand added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 3, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants