mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
Documentation: Add VSCode debugger instructions
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Co-authored-by: sideshowbarker <mike@w3.org>
This commit is contained in:
parent
d7023f5f45
commit
aeab342fd7
Notes:
github-actions[bot]
2024-11-01 19:26:28 +00:00
Author: https://github.com/kostyafarber Commit: https://github.com/LadybirdBrowser/ladybird/commit/aeab342fd7c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2064 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/sideshowbarker
1 changed files with 52 additions and 0 deletions
|
@ -286,6 +286,58 @@ The following three example tasks should suffice in most situations, and allow y
|
|||
|
||||
</details>
|
||||
|
||||
### Debugging
|
||||
#### Mac
|
||||
If you want to run the debugger, first place the content below in `.vscode/launch.json` in the root of the project.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to WebContent",
|
||||
"type": "lldb",
|
||||
"request": "attach",
|
||||
"program": "${workspaceFolder}/Build/ladybird-debug/bin/Ladybird.app/Contents/MacOS/WebContent",
|
||||
}
|
||||
],
|
||||
}
|
||||
```
|
||||
|
||||
then run Ladybird with the debug preset and with the `--debug-process WebContent` flag:
|
||||
|
||||
```bash
|
||||
CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ BUILD_PRESET=Debug ./Meta/ladybird.sh run ladybird --debug-process WebContent
|
||||
```
|
||||
|
||||
Running Ladybird in this way will pause execution until a debugger is attached. You can then run the debugger by going to the **Run and Debug** menu and selecting the **Attach to WebContent** configuration.
|
||||
|
||||
#### Linux
|
||||
For Linux, the `launch.json` will instead be the file below.
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach and debug",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "${workspaceRoot}/Build/ladybird-debug/libexec/WebContent",
|
||||
"MIMode": "gdb",
|
||||
},
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Running Ladybird as follows:
|
||||
|
||||
```bash
|
||||
BUILD_PRESET=Debug Meta/ladybird.sh run ladybird --debug-process WebContent
|
||||
```
|
||||
|
||||
Then follow the same steps found in the Mac section.
|
||||
|
||||
### License snippet
|
||||
|
||||
The following snippet may be useful if you want to quickly generate a license header, put it in `.vscode/ladybird.code-snippets`:
|
||||
|
|
Loading…
Reference in a new issue