Open lucas-yotsui opened 1 year ago
Thanks for the feedback! As currently implemented, it looks like the debug button is only designed to do a quick launch that doesn't use the launch.json
configuration. That said, extending the button to support your use case sounds like a reasonable feature request.
You can edit some of the properties of Quick Debug with the cmake.debugConfig
setting. The properties supported by cmake.debugConfig
should be mostly the same as the ones supported by launch.json
. I should have updated that documentation a while ago, but kept forgetting.
Example:
{
"cmake.debugConfig": {
"MIMode": "gdb",
"miDebuggerPath": "C:/ProgramData/chocolatey/lib/gcc-arm-embedded/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gdb.exe"
}
}
I am having this exact problem!
The only difference is that our debugging solution uses a custom debugger / cannot be configured with the ms-vscode.cpptools
debugging engine whatsoever, so we're completely out of luck.
I'd love to see this feature incorporated!!
@dleclairbb Thanks for your feedback. Have you been able to test out whether @bobbrow's suggestion helps you here?
Thanks!
@gcampbell-msft I did try but was not able to find any configs that would launch the custom debugging engine I'm trying to use.
@dleclairbb Understood, thanks for confirming. Unfortunately this comment: https://github.com/microsoft/vscode-cmake-tools/issues/3200#issuecomment-1589626231, is most accurate of the current state. Currently the debug button is only designed to launch from quick launch.
Currently, you could likely workaround this by figuring out a proper launch.json and use it from the debug menu. As for extending the debug button, we have this work tracked for 1.16 and will be assessing it during that milestone. Thanks!
we have this work tracked for 1.16 and will be assessing it during that milestone.
Having two debug buttons in the window will certainly be confusing. At least we need a configure item to hide it.
this is a real shame. this extension could be excellent, but the fact that it doesn't integrate into vscode's debug & tasks config makes it almost unusable.
Brief Issue Summary
I am trying to create a project to program a Tiva C Series board using VS Code and CMake.
So far, I've managed to make it kinda work, since it builds, flashes and even lets me debug it. However, it was based on sketchy
launch.json
andtasks.json
files and I was not happy with it. So now I'm trying to make it work properly with the CMakeTools extension in a way that I can start the debugger through the button on the bottom navbar provided by the extension. The problem is that it does not seem to use mylaunch.json
file, so when it launches it uses the wrong debugger path and executable (which were properly pointed by thelaunch.json
file).My project currently look like this: my project structure.
It basically consists of a
src
folder containing my source code, aCMakeLists.txt
file, acmake
folder containing the toolchain configuration, a linker file for the Tiva, a.vscode
folder containing thelaunch.json
andtasks.json
files and the build output directory generated by CMake.As of right now, if I click on the build command on the CMakeTools extension navbar it builds correctly and flashes to the Tiva using a custom target command in my CMake. But when I click on the debug button it does not launch properly, instead it gives me this output.
This is my launch.json file:
As can be seen in this launch.json, the path I wanted to get the debugger from is
C:/ProgramData/chocolatey/lib/gcc-arm-embedded/tools/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gdb.exe
, but in the picture in the output it shows that it tried to useC:/ProgramData/chocolatey/bin/arm-none-eabi-gdb.exe
(which does work so it's fine, I guess). And the biggest problem is apparently it is looking for the launch program asC:/Users/Lucas Yukio/Documents/Projetos Tiva/teste display/build/projeto
which is missing the.axf
extension at the end.When I launch the debugger using the
f5
keyboard shortcut it launches properly, so my best idea is that the extension is not using thelaunch.json
file I made. Is it correct? And if so, how do I fix it?CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response