Closed
Description
Brief Issue Summary
The debug button doesn't work in vscode-remote inside containers.
Expected:
Show a list of tragets to select for debug.
Apparent Behavior:
Show error message below:
Failed to prepare executable target with name 'undefined'
Platform and Versions
- Operating System:
- CMake Version: 3.18.1
- VSCode Version: 1.48.0
- CMake Tools Extension Version: 1.4.1
- Compiler/Toolchain: gcc7.5
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
definelicht commentedon Jan 28, 2021
I'm also getting this when running via SSH to a remote machine:
Any insight would be appreciated!
andreeis commentedon Jan 28, 2021
Thank you for opening this report. We will investigate why the quickPick with the launch targets is not automatically shown.
One possible reason is a failed configure. Do you confirm that your project configures successfully?
In the meantime, you can specifically select a launch target via the command "CMake: Set Debug Target" in the pallette. Then hopefully the debug operation will work for you. Please let us know if this workaround works.
definelicht commentedon Jan 29, 2021
Manually configuring the debug target fixed the issue for me - thank you.
The project configured and built as expected when I experienced this issue, so I don't think the cause was a failed configure.
Let me know what additional information I can provide.
andreeis commentedon Jan 29, 2021
Let us know if it happens again after you reload and don't manually configure anything. Make sure you don't have CMake.configureOnOpen set to false.
paleomoon commentedon Nov 19, 2021
This happened when I made a mistake in CMakeList.txt:
set(CMAKE_BUILD_TYPE DEBUG)
.Change to
set(CMAKE_BUILD_TYPE Debug)
fixed the issue 😂.maximilianmordig commentedon Aug 22, 2022
I made it work by making sure that it is
Debug
rather thanDEBUG
, (setting"cmake.loggingLevel": "debug"
in.vscode/settings.json
to get verbose logs), deleting<cmake_build_folder>/.cache
, then reload vscode window, then runset debug target
which asks me for the target, as expected.Eveheeero commentedon Jan 28, 2023
on my case, this happened when CMakePresets.json has no cacheVariables::CMAKE_BUILD_TYPE
WORKED_AROUND: Worked VSCode's cmake may cause issue "microsoft/vscod…
gcampbell-msft commentedon Jul 6, 2023
Closing this as it seems that the issue comes from when the CMAKE_BUILD_TYPE is incorrectly defined. Please let us know if it should be re-opened or revisited for any reason.
cyfex commentedon Aug 11, 2023
For me, CMake: Reset Cmake Tools Extension State (For troubleshooting) works.