Skip to content

Debugging ksqlDB

Start KsqlServerMain (directly or indirectly using ksql-server-start shell script) with the following JPDA configuration as part of KSQL_OPTS environment variable.

export KSQL_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005"

suspend=y will suspend the JVM process until you attach to the address=*:5005.

$ ./bin/ksql-server-start config/ksql-server.properties
Listening for transport dt_socket at address: 5005

Attach to the process (e.g., in IntelliJ IDEA) and step through the code. Enjoy!