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

(Discussion) Possible to launch multiple debuggers? #4507

Closed
factormystic opened this issue Mar 21, 2016 · 5 comments
Closed

(Discussion) Possible to launch multiple debuggers? #4507

factormystic opened this issue Mar 21, 2016 · 5 comments
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) verified Verification succeeded
Milestone

Comments

@factormystic
Copy link

I'm interested in understanding what it would take to be able to run multiple debuggers at once in the same vscode instance.

For example, simultaneously debugging a rails app's ruby code (eg, with the recently featured ruby debugger) and its javascript code (eg, with vs-chrome-debug). I'm envisioning breakpoints in both server and client code, with the respective debugger handling the respective file types.

How feasible is this? What kind of undertaking would it be to be able to activate more than one launch.json configuration entry at once?

@jrieken jrieken added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Mar 21, 2016
@jrieken
Copy link
Member

jrieken commented Mar 21, 2016

fyi @weinand @isidorn

@weinand weinand self-assigned this Mar 21, 2016
@weinand weinand added this to the March 2016 milestone Mar 21, 2016
@weinand
Copy link
Contributor

weinand commented Mar 21, 2016

@factormystic you can run multiple debuggers easily by opening more VS Code windows. Every window supports one debugger. The only limitation is that you cannot run more than one debugger from a single project folder, because VS Code doesn't allow you to open a project folder in more than one window (we are planning to lift the limitation).
But there is a simple workaround: create sub folders in your project folder and open these in different VS Code windows.

@weinand weinand closed this as completed Mar 21, 2016
@factormystic
Copy link
Author

I'm aware that it should be possible with multiple instances, by awkwardly opening different folders. That's kind of a hack and not particularly exciting, even though it is possible.

The really exciting thing is the prospect of being able to run multiple debuggers at once in the same vs code instance, as I said.

Much like it would not be very exciting if VS Code only allowed one type of syntax highlighting per instance, but instead loads separate syntax highlighting per file type.

So again the question is, what kind of difficulties would be associated with launching a debugger not exclusively in a VS Code instance, but basically on a per file type (or other) basis?

@weinand
Copy link
Contributor

weinand commented Mar 21, 2016

@factormystic VS Code supports one window and one extension host process per renderer:

2016-03-21 22-24-13

The VS Code debugger could easily manage multiple debug adapters, however they all would have to live in one window. Before going this route, we have would have to improve the UI support (multiple windows, etc.).

Supporting multiple debugger instances in separate windows by using multiple renderer processes is trivial. We would just have to remove one line of code. This will come next.

We are all using a single VS Code application with 4+ projects and 2 and 3 debuggers open. I don't view this setup as "awkward" as any other application with multiple windows.

Running multiple debuggers behind one renderer process makes sense if the debuggers are actually operating in a coordinated way, but currently they are not. So the advantage of this approach is more of theoretical value for now.

@weinand weinand added the verified Verification succeeded label Mar 23, 2016
@factormystic
Copy link
Author

Interesting, thank you for explaining that @weinand. I agree that even more value would be had if separate debuggers were coordinated, but I disagree that such a thing is necessary to get value out of multiple debuggers.

Again to my example, if I'm debugging a rails app & javascript, if I can place breakpoints in a controller and in the frontend right before an ajax request, it's not extremely necessary that control flow be automatically transferred from the js debugger to the ruby debugger or some magic like that... I can just wait for the ruby debugger's breakpoint to be hit.

And, as you say, debugging the same project in multiple windows gets a lot of the way there and is already planned, which will be nice.

@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
*question Issue represents a question, should be posted to StackOverflow (VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants