Now you can debug Dgraph via vscode.
It’s very simple to get started.
- Clone the repository.
PS. Make sure you have the Go env ready. - Go to the VsCode debug tab.
- In the debug execution field, choose the “normal” or “ACL” task.
- Add your breakpoints anywhere.
PS. But make sure you are putting in the right place that it will be triggered. - Use the variables panel to inspect the variables. You can change the value of variables on the fly.
- Use the debug control that will appear at the top to navigate between breakpoints.
Optionally:
You can use Jaeger out of the box. Just run an instance in the same port in the config and done.
Ready. You are debugging Dgraph.
Don’t forget to clear the paths every time you start a new debug. If you don’t want to use the same artifacts and dataset used in the previous debug.