Build project without debugging symbols
See original GitHub issueBrief Issue Summary
I’m working in a workspace with a lot of projects. The projects were working fine, even the debug. But when I created a new project in this same workspace, I could not debug it. The debug start without error, but the source code with the current line was not showed.
In the image below there is the panel with debug commands, but it looks like there is no debugging symbols. The Build Variant was set to Debug.

So, as a workaround I created a new line in the CMakeLists.txt file:
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
With the workaround it worked fine:

Am I missing some configuration?
Platform and Versions
- Operating System: Local: MacOS 10.13.6, Remote: Debian 10 running in Virtual Box
- CMake Version: 3.13.4
- VSCode Version: 1.57.0
- CMake Tools Extension Version: 1.7.3
- Compiler/Toolchain: GCC 8.3.0 x86_64-linux-gnu
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Compile without debug information - Lazarus wiki
Q: I can't find the option to compile without debug information. ... In the "Options for Project: xxx" dialog click the "Debugging" node ......
Read more >Debugging without Debugging Symbols - c++ - Stack Overflow
You can have debugging symbols available in a release build and it shouldn't change the behavior of the program at all. If you're...
Read more >Set debug and release configurations - Visual Studio (Windows)
Generate symbol files for a C++ project ... In the side pane, choose Linker > Debugging, then select options for Generate Debug Info....
Read more >Upload without debugging - ST Community - STMicroelectronics
How can it be possible that there isn't any straightforward procedure to compile a release binary without debugging symbols and upload it ...
Read more >Debug modules that have no debug information (PDB)
Prior to debug modules that have no PDB, check the following settings: ... Debugging | Symbols options page, make sure that the Cache...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Oh I didn’t want you to set “cmake.configureOnOpen” to “false”, but make sure you didn’t already somewhere, I want it to be “true” (or default, meaning missing from settings.json). I only wanted “cmake.clearOutputBeforeBuild” to be “false”. In any case, I’ll have a look at the new log, maybe I spot something.
Reactivating this report then. Unfortunately, the build cleared the output channel. Set “cmake.clearOutputBeforeBuild” to “false” in the same place as “loggingLevel” (it defaults to “true” as users need most of the time). And try to reproduce again? And share a new log, hopefully with more information. Also, do you set “cmake.configureOnOpen” to “false” anywhere?