Skip to content

Debugging

Janne Valkealahti edited this page Oct 31, 2022 · 2 revisions

Debugging a shell application is theoretically same as debugging any other jvm process, however the shell part of it will complicate things as IDE’s have different type of support running a proper command-line applications.

  • VSCode probably has a best support as you can directly start a shell in a debug mode directly within IDE.

  • STS/Eclipse contains some sort of a support running a shell but it’s implementation is missing most of a modern shell capabilities.

  • IDEA is currently probably a worst one as in a debug mode it seems to connect directly to jvm input/output streams and fully misses shell capabilities.

If you’re unable to directly launch shell application in a debug mode within IDE, one workaround is to use your favourite shell and start jvm process with a debug mode:

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:8000 -jar target/demo-0.0.1-SNAPSHOT.jar

And then connect your IDE to it as an external debug target.

Pages

Help

Clone this wiki locally