Skip to content

Commit

Permalink
feat(docs): Add documentation on how to run RW with debugger (risingw…
Browse files Browse the repository at this point in the history
…avelabs#7652)

Simple docs on how to run RW locally using a debugger. Hope you find it useful. For me it sometimes helps to step through the code line by line

Approved-By: lmatz
  • Loading branch information
CAJan93 authored Feb 2, 2023
1 parent 9b9e092 commit df85930
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ http://ecotrust-canada.github.io/markdown-toc/
* [Configure system variables](#configure-system-variables)
* [Start the playground with RiseDev](#start-the-playground-with-risedev)
* [Start the playground with cargo](#start-the-playground-with-cargo)
- [Debug playground using vscode](#debug-playground-using-vscode)
- [Develop the dashboard](#develop-the-dashboard)
* [Dashboard v1](#dashboard-v1)
* [Dashboard v2](#dashboard-v2)
Expand Down Expand Up @@ -197,6 +198,10 @@ Then, connect to the playground instance via:
psql -h localhost -p 4566 -d dev -U root
```

## Debug playground using vscode

To step through risingwave locally with a debugger you can use the `launch.json` and the `tasks.json` provided in `vscode_suggestions`. After adding these files to your local `.vscode` folder you can debug and set breakpoints by launching `Launch 'risingwave p' debug`.

## Develop the dashboard

Currently, RisingWave has two versions of dashboards. You can use RiseDev config to select which version to use.
Expand Down
17 changes: 17 additions & 0 deletions vscode_suggestions/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
// Use this if you want to debug risedev p locally
"name": "Launch playground debug",
"type": "lldb",
"request": "launch",
"program": "${workspaceRoot}/target/debug/risingwave",
"args": [
"playground"
],
"cwd": "${workspaceRoot}",
"preLaunchTask": "build rw bin"
}
]
}
14 changes: 14 additions & 0 deletions vscode_suggestions/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build rw bin",
"type": "shell",
"command": "/bin/bash",
"args": [
"-c",
"risedev k ; cargo build --bin risingwave"
]
}
]
}

0 comments on commit df85930

Please sign in to comment.