Breakpoint debugging via the Debug Adapter Protocol.
bin/penelope-dap speaks the standard Debug Adapter Protocol over stdio. Any DAP-compatible editor (VSCode, Neovim's nvim-dap) can drive a Penelope debugging session.
.pen file and start executionsourceMaprepl evaluation at a breakpointInstall the extension in dev mode (see vscode-extension/README). Open a .pen file → Run and Debug → "Launch Penelope file".
{
"type": "penelope",
"request": "launch",
"name": "Launch Penelope file",
"program": "${workspaceFolder}/${file}"
}
local dap = require('dap')
dap.adapters.penelope = {
type = 'executable',
command = 'bin/penelope-dap',
args = {},
}
dap.configurations.penelope = {
{
type = 'penelope',
request = 'launch',
name = 'Launch Penelope file',
program = '${workspaceFolder}/${relativeFile}',
},
}
The adapter understands these DAP requests: initialize, launch, setBreakpoints, configurationDone, continue, next, stepIn, stepOut, restart, threads, stackTrace, scopes, variables, terminate, disconnect. Emits events: initialized, stopped (reasons: entry, breakpoint, step, pause), output, terminated.
The wire format is identical to LSP — Content-Length-framed JSON-RPC over stdio.