Visual Studio Code – Active Folder? – Discussion – Connect IQ
Well, the active project for the “Monkey C: Build Current Project” command (and other “Monkey C…” commands in the palette) is determined by the currently open file. Unfortunately, the Run command always seems to run the first project that was built since you opened VS Code. Not sure if this is a bug in the Monkey C extension or not. All I know is it doesn’t seem to be a problem with other kinds of projects (like javascript).
To facilitate choosing the project you want to run, create a launch config for each project:
code.visualstudio.com/docs/editor/debugging#_launch-configurations
1) Click on the Run/Debug icon in the left sidebar
You’ll see something like the following screenshot when you have no existing launch configurations.
2) Click “create a launch.json file”. You’ll be prompted to select a project and a debugger/language (choose “Monkey C”)
3) For subsequent projects, the UI for creating a launch.json file will look slightly different.
The run/debug tab will show your existing launch configs in a dropdown. Open the dropdown to add additional projects:
Once you’ve done that, you can select a project to run using the dropdown in the run/debug menu.
Read more here: Source link