You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a project has multiple executables, there is apparently no way to specify which one will be loaded or debugged. As an example, the picow_blink example has two executables: picow_blink and pico_blink_slow_clock. However, the "Debug Project" operation appears to assume that the project in CMakeLists.txt is also the name of the executable, so it will always run/debug pico_blink_slow_clock. There appears to be no way to debug any other executable within the project (in this case picow_blink).
The CMake VSCode extension does support running/debugging of all executables that are defined within the project. This can be used by settings the raspberry-pi-pico.useCmakeTools workspace setting to true. (The setting for the extension does not seem to be propagated into new workspaces, so this must be done every time, along with a couple of additional configuration steps so that it will build properly.)
Please consider adding to the pico-vscode extension an option to select the executable to be run/debugged in a way similar to what the CMake extension supports.
The text was updated successfully, but these errors were encountered:
If you set that useCmakeTools variable to true and then try debugging using the methods in launch.json added by the extension, it should allow for the debugging of multiple executables.
By default the extension does not use this as the CMake Tools extension throws a lot of different messages which can be confusing for new users, but that variable switches it to using that extension for compiling and selecting the target for debugging, so it should work for your use case
OK, I understand why this is false by default for the extension, but I was a little surprised that new workspaces don't inherit the extension setting. Turning it on for the extension has no effect - it is still necessary to turn it on in each workspace. It might be good to mention this in the setting description.
When a project has multiple executables, there is apparently no way to specify which one will be loaded or debugged. As an example, the
picow_blink
example has two executables:picow_blink
andpico_blink_slow_clock
. However, the "Debug Project" operation appears to assume that theproject
inCMakeLists.txt
is also the name of the executable, so it will always run/debugpico_blink_slow_clock
. There appears to be no way to debug any other executable within the project (in this casepicow_blink
).The CMake VSCode extension does support running/debugging of all executables that are defined within the project. This can be used by settings the
raspberry-pi-pico.useCmakeTools
workspace setting totrue
. (The setting for the extension does not seem to be propagated into new workspaces, so this must be done every time, along with a couple of additional configuration steps so that it will build properly.)Please consider adding to the pico-vscode extension an option to select the executable to be run/debugged in a way similar to what the CMake extension supports.
The text was updated successfully, but these errors were encountered: