Multiple startup files in Visual Studio Code

Is there a way to debug multiple files from one folder? I was expecting that I could create multiple launch files in the .settings folder and select the one I want to execute, but that doesn't seem to work. It seems to only insist on "launch.json".

+7


source to share


2 answers


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



+10


source


While the question is about multiple configurations for a single folder, I just want to mention an alternative: multiple folders in the same workspace, each with its own launch.json.



One way is to just copy the file .vscode/launch.json

to another folder and edit it. The required configuration can be selected or edited from the drop-down menu to the right of the "Start Debugging" button (green "game").

0


source







All Articles