visual-studio-code

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'.


Solution

  • 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/editor/debugging has 3 different launch configurations. You can specify any amount, and choose the active one using a drop down in the debug view.