Closed planger closed 1 year ago
- Is there a reason that it is a task and not a launch config?
Not really, but a launch config always needs a launch type
, which typically is associated with an extension that supports launching / debugging a specific type of application. As we just want to run an executable, we could (mis-?)use node-terminal
for that. That would work.
{
"type":"node-terminal",
"request": "launch",
"name": "Launch Example C++",
"command": "${workspaceFolder}/Example",
"preLaunchTask": "Binary build"
}
However, I'm not really seeing a benefit to using this launch config above in comparison to the GDB configuration. It is the same but has less features, i.e. breakpoints won't work. Using a task instead of the launch at least wouldn't imply that breakpoints may work (which they won't with the launch config above, but would with the GDB launch config). WDYT?
- Should we maybe name it consistently with the debug config? "Launch Example C++". Which might imply that we also rename the debug config to something better?
Sure, I'm happy to rename once we settled on whether it is going to become a launch config or remain a task.
1: sounds good! 2: Yes, please go ahead!
Thanks, I kept it as a task, but renamed the task to "Launch Example C++".
Fixes #44 Contributed on behalf of STMicroelectronics.
What it does
Adds a task that runs the binary (without debugging) to the CMake example.
https://user-images.githubusercontent.com/588090/212020429-04550a69-6226-4907-ad01-2b442666a364.mp4
How to test