Vscode: Support launching multiple launch configs manually?

Created on 25 Oct 2016  ·  3Comments  ·  Source: microsoft/vscode

With the new "composite" launch config type, we can debug multiple processes simultaneously, but we have to launch them at the same time. This will be tricky any time you are launching 'client' and 'server'-like things, because the server may not be ready for a second, and the client may expect it to be ready immediately.

I tried to set this up with my node-debug2 tests, which was a scenario I'd had in mind, but it only works sometimes, depending on how quickly the debug adapter process starts up.

Have you talked about letting users start the server config, make sure it starts up correctly, then launch the client config once the server is ready?

debug feature-request

Most helpful comment

For November let's go with @isidorn proposal:

  • launch config drop down is no longer disabled if a debug session is running, so a different config can be selected easily.
  • play button is only disabled if the drop down shows the launch config that is already running. If another launch config is selected, it becomes enabled.

(and we keep the 'composite' launch config but we will productise it; see #14842)

All 3 comments

This is an ongoing discussion which we plan to tackle in november. Exposing multi target debugging via a launch.json configuration has the following pros:

  • Can easily launch any number of process by just one click

While doing it with just continue clicks on the play buttons has the following pros:

  • Not complicating launch.json more
  • Can choose when to launch each process

Users can also accidentely launch multiple processes but we can solve that with some smart UX. Enabling the play button only if a user has choosen another configuration (which has a limitation of not being able to debug two of the same processes at the same time - which is not really a scenario imho).

I am personally more for the second approach. However for the current milestone we will go with the first one to get feedback.
Assigning this to november since then we can discuss more on what approach to settle on.

One of the key things to think about is how important is multi shard debugging as a scenario for us.

@roblourens the current solution with the 'composite' launch config is a temporary measure that should enable testing. It is by no means the one and only way how we surface multi session debugging. Piggy backing this feature on a launch config was just the easiest way to get something into the October drop.

In addition to the UI based approach from Isi's comment, we plan to support something similar to the preLaunchTask: in a launch config you can specify another launch config that gets started after the first has been running for some time. This would cover your use case.

For November let's go with @isidorn proposal:

  • launch config drop down is no longer disabled if a debug session is running, so a different config can be selected easily.
  • play button is only disabled if the drop down shows the launch config that is already running. If another launch config is selected, it becomes enabled.

(and we keep the 'composite' launch config but we will productise it; see #14842)

Was this page helpful?
0 / 5 - 0 ratings