Back to Enso

Debug Adapter Protocol

docs/debugger/dap.md

2025.3.41.4 KB
Original Source

Debug Adapter Protocol

Debug Adapter Protocol is yet another instrument available for a Truffle language. The DAP is a native protocol for VSCode and as such, works only via VSCode. To start Enso with DAP server waiting for a client to attach, launch enso via:

env JAVA_TOOL_OPTIONS='-Dpolyglot.dap' ./built-distribution/enso-engine-*/enso-*/bin/enso --run *.enso

Once DAP server is started and ready for a client to be attached, the following output will be printed:

[Graal DAP] Starting server and listening on /127.0.0.1:4711

There is a Launch configuration in the repository in .vscode/launch.json with name Debug Adapter Protocol, you can start debugging via Run and Debug view by selecting the Debug adapter protocol configuration and pressing play:

Another screenshot showing the DAP in action:

Note that the port 4711 is the default port for DAP.