Debug

Breakpoints

  • Prerequisites: See Running via Launch Task from source to see how to run the development version of Dendron from inside the IDE

  • GOTCHA: mocha has low timeouts and you might run into tests failing when stepping through them. if you are stepping through a test, you'll want to set the timeout property to a high number (eg. 1e5) to avoid this

Development

For testing Dendron Plugin, you can set a regular breakpoint inside of VSCode.

For non plugin code, this won't work. The current workaround is to manually add a debugger; statement inside the code. The extension will hit it when restarted under the debugger.

Breakpoints in the Server

The Dendron plugin communicates to the dendron server for most operations. To debug server side code:

  1. Launch the server using the build task start debug server launch task
  2. Update the following settings of Dendron to use a running server through the following workspace setting
dev:
    dendron.serverPort": 3005`
  1. Reload the workspace for the settings to take affect

debug task

Verbose Logs

  • set in dendorn.workspace.config
"dendron.logLevel": "debug",

Backlinks