docs/projects/regal/debug-adapter.md
In addition to being a language server, Regal can act as a Debug Adapter for supported clients. A Debug Adapter is a long running program that can communicate with a debugger client, such as Visual Studio Code's debugger, to provide live, step-by-step, debugging capabilities for a language.
A debugging session in VS Code
See the documentation in the Editor Support page for supported clients:
:::info
If your evaluation depends on a data.json file, please make sure to have
.manifest files to mark your bundles, or
configure roots
in Regal's config.
:::
The Regal Debug Adapter currently supports the following features:
Breakpoints allow you to continue execution of a policy until a given point. This can be helpful for:
Either at a breakpoint or while stepping through code, you can inspect the
local variables in scope as well as the contents of the global input and
data documents.
input will be loaded from input.json in the workspace if it exists.
Print statements are also supported, these are shown in the debug console: