question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build project without debugging symbols

See original GitHub issue

Brief 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.

image

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:

image

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:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
andreeiscommented, Jun 18, 2021

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.

1reaction
andreeiscommented, Jun 17, 2021

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found