Read errors
elide --error-format=plain run app.jsPlain errors go to stderr with a short stack; program output stays on stdout. Add --verbose or --debug for
Elide’s own logs.
| Flag | Effect |
|---|---|
--abort-on-uncaught-exception | Print the error, then raise SIGABRT (exit 134) so the OS writes a core dump. |
--redirect-warnings=FILE | Write process warnings, such as process.emitWarning(), to FILE, not stderr. |
--timeout=DURATION | Stop the program after DURATION (for example 30s) with exit 124. |
--max-mem=SIZE | Limit the heap size, for example 512m. Exceeding it fails with a nonzero exit. |
Attach a debugger
| Program | Flag | Listens on | Client |
|---|---|---|---|
| JavaScript, TypeScript, Python | --debugger=cdp | ws://127.0.0.1:1337/… | Chrome DevTools or any CDP client |
| JavaScript, TypeScript, Python | --debugger=dap | 127.0.0.1:4711, waits for a client | Any DAP-capable editor |
| Java, Kotlin | --debugger | 127.0.0.1:5005 (JDWP), suspended | IntelliJ IDEA, VS Code, jdb |
elide run --debugger=cdp app.jsDebugger listening on ws://127.0.0.1:1337/<id>/inspect
For help, see: https://docs.elide.dev/guides/debugging
E.g. in Chrome open: devtools://devtools/bundled/js_app.html?ws=127.0.0.1:1337/<id>/inspectOpen the devtools:// link in Chrome.
elide run --debugger=dap app.js
elide run --debugger Hello.ktListening for transport dt_socket at address: 5005Change a listener’s address with --debugger-host and --debugger-port:
elide run --debugger=dap --debugger-port=5678 app.js
elide run --debugger=0.0.0.0:5005 Hello.ktA number or host:port after --debugger is a JDWP address and applies to Java and Kotlin only. JDWP has no
authentication: bind beyond loopback only on a trusted network, or use an SSH tunnel.
Debug tests
elide test --debugger
elide test --debugger=dap sample.test.mts
elide test --debugger=5005| Flag | Debugs |
|---|---|
--debugger | Guest tests over CDP and JVM tests over JDWP on 5005 |
--debugger=cdp or dap | Guest tests only |
--debugger=PORT | JVM tests only |
A path narrows guest tests to one file. Narrow JVM tests by package name, not by path. While a debugger is attached, guest test files run one at a time.
Measure coverage
elide run --coverage app.jsElide prints a Coverage Report after the program exits, with statements, lines and functions covered per file.
Profile CPU time
elide run --profiler=cputracing app.js╭Profiler Report───────────────────────────────────────────────────────────────╮
│ Location Root Total Interpreted Compiled │
│ app.js fib 21.89k 100.0% 21.89k 100.0% 0 0.0% │
│ app.js :program 1 0.0% 1 100.0% 0 0.0% │
╰──────────────────────────────────────────────────────────────────────────────╯Total counts calls to each function. For JFR recordings, heap dumps and Linux perf, see
Monitoring and Profiling.
Trace with Insights
// insight.js
insight.on("enter", (ctx) => {
console.log("enter", ctx.name);
}, { roots: true });elide run --insights=insight.js app.jsEach function entry prints a line such as enter fib. See the Insights API for events and filters.
Report a bug
elide info
elide agent diagnostics
elide agent bugelide agent bug prints the issue tracker URL and a Markdown report template. Fill in the exact command, the expected
behavior, and any crash report.