Add info about enabling debugging for new contributors (#1719)

This commit is contained in:
Anton Blomström 2024-05-02 23:42:18 +02:00 committed by GitHub
parent 2e4c82fa64
commit 6b14bb8f01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -69,6 +69,15 @@ the issue or issues that your changes address.
- [vadimcn.vscode-lldb](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)
2. Open `Command Palette` with Ctrl+Shift+P or F1 and type `LLDB: Generate Launch Configurations from Cargo.toml` then select it, this will generate a file that should be saved as `.vscode/launch.json`.
You may also want to enable debugging by creating a `.vscode/settings.json` file:
```json
{
"rust-analyzer.runnables.extraEnv": {
"CARGO_PROFILE_DEV_DEBUG": true
}
}
```
since this repo has `debug = 0` in the root `Cargo.toml` to speed up compilation.
3. Now you can enable breakpoint on code through IDE and then start debugging the library/binary you want, such as the following example:

View File

@ -25,6 +25,15 @@ To use the debugger, follow these steps:
that should be saved as `.vscode/launch.json`.
2. Select the configuration from the "run and debug" side panel, then select the target from the
list.
You may also want to enable debugging by creating a `.vscode/settings.json` file:
```
{
"rust-analyzer.runnables.extraEnv": {
"CARGO_PROFILE_DEV_DEBUG": true
}
}
```
since this repo has `debug = 0` in the root `Cargo.toml` to speed up compilation.
3. Now you can enable breakpoints on code through IDE then start debugging the library/binary you
want, like in the following example: