Summary: | Debugging silently does not work without CMAKE_BUILD_TYPE=DEBUG | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Alexander Potashev <aspotashev> |
Component: | CPP Debugger | Assignee: | kdevelop-bugs-null |
Status: | REPORTED --- | ||
Severity: | normal | CC: | jurajoravec, luishcq, niko.sams, saurav1.sen |
Priority: | NOR | ||
Version: | 5.3.2 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
screenshot1
screenshot2 |
Description
Alexander Potashev
2019-04-29 19:10:23 UTC
What is your project build type ? (In reply to Juraj from comment #1) > What is your project build type ? I don't know. How do I find it out? You should be able to set it during project creation. Or if I am not wrong you can find it in project coniguration. Menu > Project > Open Configuration... > CMake > Show Advanced > Build Type: On project creation, it was set to the default value "Debug". Still build/CMakeCache.txt has this variable empty: "CMAKE_BUILD_TYPE:STRING=" Created attachment 119725 [details]
screenshot1
Created attachment 119726 [details]
screenshot2
This still happens with KDevelop 5.5.2 (on Debian testing). For a new and very small project the default configuration is "debug" but the compilation is not the debug one. I missed lots of time trying to check if I had configured KDevelop or the launch in wrong ways, even checked in other machines (where I had to do install, etc). Only when I decided to create a new configuration as "release" and compiled the project I saw that the executables, debug and release ones, are the same! And, after that, when I compiled again the debug version, then the executable was bigger and really with debug information, and the breakpoints started to work as they should. After... a day of work :( Steps to reproduce: 1 - Create a new project, for instance in the category Standard and type terminal; 2 - I opted not to use a version control system; 3 - A sample/initial main.c appears, I will use it (a "Hello, World!" classic) 4 - configure a launch for the debug 5 - put a breakpoint in the line that will print the "Hello, World!" 6 - start the debug session Observed result The program runs and finishes, without regard to the breakpoint However, if I create a new configuration for the project (Project/Open configuration...) of any type (debug or release) then the initial configuration will bbe compiled as a debug version. FIX I noticed, while writing here in the debug tracker, that if I had selected Project/Configure the selection after the initial project was created, then the compilation will be correct, with debug information, and breakpoints work |