I have a solution with multiple console apps and I want to debug the selected one like in Visual Studio. Is there a way to do it?
I found that the only way for me was to delete launch.json and add it to the current project every time. But that is not very convenient.
2
Answers
Actually I found a solution. The only problem with adding projects to the
launch.json
file is that I have a lot of projects with a lot of folders and long names.The solution I've found is really simple! Because I use C# extension there is a setting in the User Settings -
CSharp > Debug: Console
, there I changed it tointegratedTerminal
and it fixed the issue. Now I can debug any app without using.vscode
and read from the console.The
configurations
key in launch.json is an array. You can have multiple configurations in the launch.json, one (or more) for each of your console applications. You can read about this in the documentationFor example:
After doing this, the Run and Debug dropdown will have multiple configurations. You can select the first one and start it, and then while the first one is running, go back and select the second one, and so on.