-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Comments
@isidorn fyi |
Currently this is not supported. 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? |
fyi @weinand |
@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. |
@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. |
@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. |
@weinand Could you please show me an example of a folder structure like that? |
@buzinas here we go:
|
@weinand Oh, that's really cool. I'll give it a try! Thank you :) |
@gregvanl I think my workaround from above would be a good FAQ item for the debugger section (until we implement the real fix)? |
@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? |
@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: |
@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. |
@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 ;-) |
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 |
This will be addressed as part of #13426 |
Since this is being addressed as part of #13426, tagging this one as duplicate to help in our iteration tracking queries |
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
The text was updated successfully, but these errors were encountered: