mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
Documentation: Debugging Ladybird in CLion
This commit is contained in:
parent
71c54dd37b
commit
59c862cab9
Notes:
sideshowbarker
2024-07-17 04:03:27 +09:00
Author: https://github.com/SebastianZaha Commit: https://github.com/SerenityOS/serenity/commit/59c862cab9 Pull-request: https://github.com/SerenityOS/serenity/pull/19837
1 changed files with 8 additions and 0 deletions
|
@ -124,6 +124,14 @@ export SERENITY_SOURCE_DIR=$(realpath ../)
|
|||
./Build/ladybird/ladybird # or, in macOS: open ./Build/ladybird/ladybird.app
|
||||
```
|
||||
|
||||
### Debugging with CLion
|
||||
|
||||
Ladybird should be built with debug symbols first. In `Meta/CMake/lagom_compile_options.cmake` remove the optimizations by changing `-O2` to `-O0`. For macOS also change the debug option from `-g1` to `-g` so that lldb is happy with the emitted symbols. In linux `-g1` can be changed to `-ggdb3` for maximum debug info.
|
||||
|
||||
After running Ladybird as suggested above with `./Meta/serenity.sh run lagom ladybird`, you can now in CLion use Run -> Attach to Process to connect. If debugging layouting and rendering issues, filter the listing that opens for `WebContent` and attach to that.
|
||||
|
||||
Now breakpoints, stepping and variable inspection will work.
|
||||
|
||||
### Debugging with Xcode on macOS
|
||||
|
||||
The `serenity.sh` build script does not know how to generate Xcode projects, so creating the project must be done manually.
|
||||
|
|
Loading…
Reference in a new issue