Debug Groovy code in Deephaven

Debugging is a critical part of software development. Deephaven supports debugging Groovy code through the JVM's built-in remote debugging protocol, allowing you to step through code, inspect variables, and find problems from your IDE.

How debugging works with Deephaven

Groovy code in Deephaven runs on the JVM. Debugging uses JDWP (Java Debug Wire Protocol), which is built into the JVM — no additional packages are needed. You start the Deephaven server with JDWP enabled, then connect a compatible IDE debugger to the exposed debug port.

This guide uses IntelliJ IDEA, which has first-class Groovy support. Both Community (free) and Ultimate editions work.

The Deephaven web IDE does not have a built-in debugger. You must use an external IDE to debug Groovy scripts.

Debugging support by installation method

DebuggerDockerSource
IntelliJ IDEA Community
IntelliJ IDEA Ultimate

Note

Any IDE or tool that supports JDWP can connect to the debug port. This guide focuses on IntelliJ IDEA because of its excellent Groovy tooling.

Getting started

Choose the guide that matches how you installed Deephaven: Docker or source. Each guide shows how to start the server with JDWP enabled and connect IntelliJ IDEA.

After setup, see Common problems for Deephaven-specific debugging issues.

Deephaven run from Docker

Enable JDWP in your Docker configuration and connect IntelliJ IDEA's remote debugger to the container.

Deephaven built from source

Start the source build with the -Pdebug Gradle flag and attach IntelliJ IDEA's remote debugger.