Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Launch Files in Visual Studio Code

Is there a way to debug multiple files from a single folder? I had expected that I could create multiple launch files in the .settings folder and pick the one I want to execute, but that did not seem to work. It seems to insist on only 'launch.json'.

like image 793
DungeonTiger Avatar asked May 16 '15 15:05

DungeonTiger


People also ask

How do I run multiple files in VS Code?

Launch VS Code and press the “Ctrl” and “P” keys simultaneously to search for a file to open in the current project. Type in the file name. To open the new file in a temporary tab, click on it once. To open the new file in a separate window that you can choose to close manually, double-click it.

Can we open multiple projects in Visual Studio Code?

You can work with multiple project folders in Visual Studio Code with multi-root workspaces. This can be helpful when you are working on several related projects at one time.

How do I Debug multiple files in Visual Studio Code?

To debug multiple services at the same timeOpen the folder corresponding to your first service in VS Code. In VS Code, select File > Add Folder to Workspace…, and pick the folder corresponding to your other service.


1 Answers

VSCode supports only one launch.json, but you can have multiple launch configurations inside one launch.json. The example at https://code.visualstudio.com/Docs/debugging has 3 different launch configurations. You can specify any amount, and choose the active one using a drop down in the debug view.

like image 93
Isidor Avatar answered Sep 23 '22 00:09

Isidor