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

Launch/Debug multiple configurations at once #1616

Closed
edvinv opened this issue Dec 23, 2015 · 18 comments
Closed

Launch/Debug multiple configurations at once #1616

edvinv opened this issue Dec 23, 2015 · 18 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality
Milestone

Comments

@edvinv
Copy link

edvinv commented Dec 23, 2015

In launch.json you are able to define multiple launch configuration but you can only select one to run with F5. Is there a way to launch two configuration with single Debug command? I want to start and debug server side node app and also use chrome debug extension for client side, all from same VSC instance.

thx

@bpasero bpasero added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels Dec 23, 2015
@bpasero bpasero added this to the Backlog milestone Dec 23, 2015
@bpasero
Copy link
Member

bpasero commented Dec 23, 2015

@isidorn fyi

@isidorn
Copy link
Contributor

isidorn commented Dec 23, 2015

Currently this is not supported. In order to do this you need to open two instances of vscode

@buzinas
Copy link

buzinas commented Mar 31, 2016

In order to do this you need to open two instances of vscode

That was my first try, but when trying to open the same project folder in a new instance, VSCode simply focus on the already opened window, instead of opening the project in the new one.

My team really needs this, it's terrible to stop client debugging, and then attach server one, and then stop, and attach client again. In fact, we're using the browser itself for client debugging, and VSCode for Node debugging, only because of this lack of support.

I have opened https://github.com/Microsoft/vscode-chrome-debug/issues/140 before actually finding this thread.

Is this feature becoming available anytime soon?

@isidorn @bpasero @chrisdias

@isidorn
Copy link
Contributor

isidorn commented Apr 1, 2016

fyi @weinand

@weinand
Copy link
Contributor

weinand commented Apr 1, 2016

@buzinas I recommend to create a sub folder for the server or client part of your project (the folder does not have to contain any code) Then you can easily create another VS Code window where you can run another debugger. We are using this approach and it works great.

Yes, we are planning to lift the limitation of only allowing a single VS Code window per project folder.

@buzinas
Copy link

buzinas commented Apr 1, 2016

@weinand Yes, since debugging both in the same instance would be much harder to accomplish - removing the limitation would be good enough (and probably an easy thing to ship).

Since our codebase huge, and we have lots of build processes / continuous integration etc etc, it would be kind of complex to make a folder refactor as you're suggesting. But I'll make a clone of the repo and give a try, maybe it's simpler than it seems.

@weinand
Copy link
Contributor

weinand commented Apr 1, 2016

@buzinas as I said, the sub-folder can be empty. The only thing that VS Code will create in that folder is another launch.json file. So no folder refactoring is necessary.

@buzinas
Copy link

buzinas commented Apr 1, 2016

@weinand Could you please show me an example of a folder structure like that?

@weinand
Copy link
Contributor

weinand commented Apr 1, 2016

@buzinas here we go:
2016-04-01 15-49-19

  • Client and server code are in the same project.
  • _dummyFolder only exists to be able to open another VS Code window on it.
  • launch.json in _dummyFolder has 'go up' one level to refer to the server code.

@weinand weinand self-assigned this Apr 1, 2016
@buzinas
Copy link

buzinas commented Apr 1, 2016

@weinand Oh, that's really cool. I'll give it a try! Thank you :)

@weinand
Copy link
Contributor

weinand commented Apr 1, 2016

@gregvanl I think my workaround from above would be a good FAQ item for the debugger section (until we implement the real fix)?

@buzinas
Copy link

buzinas commented Apr 1, 2016

@weinand Although it's launching both here now, the breakpoints don't work.

It seems that the new instance doesn't send debugging info to the master one. How do you debug the server in that example of your screenshot?

@weinand
Copy link
Contributor

weinand commented Apr 1, 2016

@buzinas yes, you are right, the VS Code on the _dummyFolder has no access to source, so it cannot set breakpoints.

Solution: don't make the _dummyFolder a sub-folder but make it a super-folder:

2016-04-01 16-35-23

@buzinas
Copy link

buzinas commented Apr 1, 2016

@weinand That's kindda problematic for our project.

But thanks for your time and attention! :)

For the next projects I'll use this approach, and for the current ones, I'll be waiting till we can open the same project in two different instances. Could this be done with an extension? If yes, I would consider developing it myself.

@weinand
Copy link
Contributor

weinand commented Apr 1, 2016

@buzinas but every folder has a parent folder, right? So VS Code can always open it (even if you cannot freely choose the name of that folder).

No, an extension cannot fix the issue that a folder cannot be opened in two VS Code windows. (Most likely the problem is just a single if-statement that needs to be removed ;-)

@thorseye
Copy link

Any updates on the possibility to attach multiple debuggers from the same VS Code window @weinand ? We've got a project with around 40 node processes (and counting), and I really like the ability to debug through VS Code. It's quite hard to follow a chain of requests through multiple services via the debugger if I cannot attach multiple debuggers at once. This was possible via multiple chrome tabs when using node-inspector.

@weinand
Copy link
Contributor

weinand commented Oct 10, 2016

This will be addressed as part of #13426

@weinand weinand modified the milestones: November 2016, Backlog Nov 10, 2016
@weinand weinand closed this as completed Nov 10, 2016
@ramya-rao-a
Copy link
Contributor

Since this is being addressed as part of #13426, tagging this one as duplicate to help in our iteration tracking queries

@ramya-rao-a ramya-rao-a added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 5, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 *duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

7 participants