Skip to content

Commit 0b003e1

Browse files
committed
docs: Updated debug build instructions for cmake
1 parent a5fa907 commit 0b003e1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/developer-notes.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,14 @@ Development tips and tricks
354354

355355
### Compiling for debugging
356356

357-
Run configure with `--enable-debug` to add additional compiler flags that
358-
produce better debugging builds.
357+
When using the default build configuration by running `cmake -B build`, the
358+
`-DCMAKE_BUILD_TYPE` is set to `RelWithDebInfo`. This option adds debug symbols
359+
but also performs some compiler optimizations that may make debugging trickier
360+
as the code may not correspond directly to the source.
361+
362+
If you need to build exclusively for debugging, set the `-DCMAKE_BUILD_TYPE`
363+
to `Debug` (i.e. `-DCMAKE_BUILD_TYPE=Debug`). You can always check the cmake
364+
build options of an existing build with `ccmake build`.
359365

360366
### Show sources in debugging
361367

0 commit comments

Comments
 (0)