> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/sast-and-sca/ocular/tutorials/debug-with-jdb.md).

# Debug Ocular Scripts with jdb

The following example shows how you can integrate Ocular for use with the Java Debugger (jdb):

```
export JAVA_OPTS='-Xdebug -Xrunjdwp:transport=dt_socket,address=8002,server=y,suspend=n'
sl ocular
```

![](/files/DfHDmRpYn5HJOmhRtTva) ![](/files/P5vj8JOtHNJWVEvAqKym)

The first line of output is `Listening for transport dt_socket at address: 8002`. When you see this, you can connect to remote debug with Java Debugger (jdb) or the debugger of your choice, e.g., IntelliJ IDEA.
