Skip to content

Debugging

GniLudio edited this page May 15, 2024 · 4 revisions

Debugging

Debug Adapters

To debug a program in SEE a executable debug adapter for that language is needed.

It is recommended to put the debug adapters into the folder Adapters, right next to the SEE folder:

* SEE/
* Adapters/
    * netcoredbg/
    * js-debug/
    * vscode-mock-debug/
    * ...

Here is a list of tested debug adapters:

Debug Adapter Languages Notes
netcoredbg C# / .NET Core
JavaScript JavaScript
GDB C
C++
Rust
...
Mock Debug - TypeScript files must be compiled to JavaScript.
(With npm install and npm run compile)

A more detailed list of available debug adapter executables can be found here: nvim-dap: Debug Adapter installation
The official list mainly contains debug adapters that have released tailored versions for specific IDEs: Debug Adapters

Starting a Debug Session

A debug session can be started (and configured) from the following buttons in any window (e.g. Code Window):
image

Adapter Configuration

The debug adapter can be configured by clicking the Debug Adapter button (bug icon) which opens a dialog with the following options:

  • Type - The language of the debug adapter.
    • Sets the default values for Working Directory, File Name and Arguments.
  • Working Directory - The working directory of the executable.
  • File Name - The name of the executable.
  • Arguments - What arguments to passed to the executable.
  • City - Which city to use for highlighting the code position.

As long as the debug adapter is put into the Adapters folder next to the SEE folder, the default values should be sufficient.

Launch Configuration

Each debug adapter type has its own set of launch parameters which can be configured by clicking the Launch Configuration button (rocket icon).

Before starting a debug session, the launch parameters must be set accordingly. (e.g. setting which program to debug)

Starting the session

A debugging session can be started by clicking the Run button (green arrow icon).

Action Bar

After starting a debug session, on the top of the screen appears a action bar:
image

The bar includes action for controlling the execution:

  • Continue
  • Pause
  • Step Over
  • Step In
  • Step Out
  • Stop

The bar also includes actions for:

  • Open the Console Window
  • Open the Variables Window
  • Highlight the Code Position
    • in the code window and city

Console

The console displays messages from the debugged program.

Filtering

The messages can be filtered with search and by channel: image

Interactive Evaluation

During a debug session the user can evaluate expressions interactively:
image

Result:
image

Variables Window

Can be opened through the button on the action bar.

image

Code Window

Hovering

Variables can be inspected through hovering in a code window.
image

Breakpoints

Can be set on the left side of Code Windows.
image

Note: If long lines are wrapped, the positions of the breakpoint indicators are misaligned on all following lines.
image

Clone this wiki locally