Connect an IDE
Elide exposes guest code to external tools over standard, open protocols, so you don't need a bespoke plugin to debug or inspect a running script. Today that means two debug protocols — Chrome DevTools (CDP) and Debug Adapter (DAP) — plus a Model Context Protocol (MCP) server for AI agents. This guide shows what's exposed, on which ports, and how to point a client at it.
Debug protocols
Pass --debugger to elide run to enable a debug protocol. The mode selects
which protocol Elide exposes:
elide run --debugger app.js # CDP (default)
elide run --debugger=cdp app.js # Chrome DevTools Protocol
elide run --debugger=dap app.js # Debug Adapter ProtocolWrite the mode with = (the flag uses require_equals), so the script path
isn't consumed as the flag value.
Chrome DevTools Protocol (CDP)
CDP is the default. It's spoken by Chrome DevTools and by editors with a JavaScript debugger built on the Chrome inspector. When enabled, Elide:
- Binds the inspector to port
9229. - Serves it under a per-session path,
/{session}/inspect, where{session}is a short random identifier minted for the run. - Suspends before the first statement so you can attach and set breakpoints.
Elide prints both a devtools:// frontend URL and the raw
ws://localhost:9229/{session}/inspect WebSocket address. Point any CDP client
at the WebSocket URL, or open the devtools:// URL in a Chromium browser. See
the Debugging guide for the full DevTools walkthrough.
attach configuration pointed at port 9229. Because the inspector path
includes a per-session segment, the exact WebSocket URL changes each run; read
it from Elide's printed output and use the attach-by-URL flow.
Debug Adapter Protocol (DAP)
DAP is the protocol VS Code and many other editors use natively for debugging.
Enable it with --debugger=dap:
elide run --debugger=dap app.jsWhen DAP is active, Elide:
- Binds the debug adapter to
0.0.0.0:4711. - Suspends on startup and waits for a client to attach before running your code.
Point your editor's DAP client at localhost:4711. Elide prints the address to
the terminal when the run starts.
9229 for CDP, 4711 for DAP) are currently fixed and not
configurable.JDWP
The Java Debug Wire Protocol appears in the debugger mode enumeration but is not yet implemented — selecting it raises a "not supported yet" error. Use CDP or DAP for now.
MCP (Model Context Protocol)
Elide includes a fully functional MCP server, letting AI agents and MCP-compatible editors interact with an Elide project. Start it with:
elide mcp # stdio transport (default)
elide mcp --mode stdio # stdio, explicit
elide mcp --mode http --host localhost --port 8125 # HTTP transportThere are two transports:
- stdio (default) — the server speaks MCP over standard input/output. This is the transport most desktop AI agents expect; point your client's command at
elide mcp. - HTTP — pass
--mode httpto serve MCP over HTTP. The default bind islocalhost:8125; override with--hostand--port.
The server picks up your Elide project configuration automatically when run from a project directory.
LSP (Language Server Protocol)
A dedicated elide lsp command exists, but it is not yet implemented — it
currently exits with a "command not implemented" message. Editor language
features (autocomplete, go-to-definition, diagnostics) over a standalone Elide
language server are planned but not available today.
What's next
- Debugging -- Step through code with Chrome DevTools, plus coverage, profiling, and the REPL
- CLI Reference -- All Elide commands and global options