KScript docs
EN

Debugging

Starting the debugger

In VS Code, you may start the debugger in three ways. Each one saves the script first, so the breakpoints sit on the lines you see:

  • Press F5 with a script open.
  • Click Debug above the script's first line, next to Run.
  • Choose Debug Script from the run button's menu at the top right of the editor, or from the Command Palette.

The script's output goes to the Debug Console, a line at a time, as it would to the terminal. When the script ends, the debugger stops by itself. Pressing Shift+F5 stops it early: the script ends where it is, and runs nothing more.

The debugger runs scripts. A test file (*.test.kscript) runs with Run Tests instead, which shows each test's result in the Testing view.