Stream: dev

Topic: How to debug container in JVM in intellij


view this post on Zulip Jose Lucas Cordeiro (Apr 02 2024 at 20:33):

Hey all! I'm trying to put some breakpoints in my environment (Intellij 2023.3) to do some debugging. I noticed the containers don't expose the 5005 port. Is there a flag or something like that i could use to achieve this and plug my debugger? or should i change the docker-compose file directly?

view this post on Zulip Jose Lucas Cordeiro (Apr 02 2024 at 20:44):

Update after exposing the 5005 port on docker-compose-dev in the dataverse service:

Both of them resulted the same connection reset error
image.png

view this post on Zulip Philip Durbin 🚀 (Apr 02 2024 at 20:54):

We ask people to configure IntelliJ (and other IDEs) to use port 9009. Please see https://guides.dataverse.org/en/6.2/container/dev-usage.html#ide-trigger-code-deploy

view this post on Zulip Jose Lucas Cordeiro (Apr 02 2024 at 21:31):

Unfortunely i don't have the ultimate edition :smile_cat:. So I wont be able to do the hot reload. But i was able to connect directly on the 9009 :D Thanks

view this post on Zulip Oliver Bertuch (Apr 02 2024 at 23:06):

That exec arg thing won't do anything. It's a Maven property you define and it's not used anywhere.

view this post on Zulip Oliver Bertuch (Apr 02 2024 at 23:08):

The port 9009 is in line with upstream Payara docs. I'm not sure how easy it would be to change it.

view this post on Zulip Oliver Bertuch (Apr 02 2024 at 23:18):

Also note that JDWP already gives you limited options to change method bodies even without DCEVM (JEP159). Not sure how to use do that in IntelliJ though. Might be good enough for adding some debugging statements etc.

view this post on Zulip Oliver Bertuch (Apr 02 2024 at 23:19):

If you want to give HotSwapAgent and DCEVM a shot, feel free to modify the base image and use a different JDK/JRE.

view this post on Zulip Oliver Bertuch (Apr 02 2024 at 23:19):

https://medium.com/javarevisited/jdk-17-with-dcevm-and-hotswapagent-4fee7095617a

view this post on Zulip Jose Lucas Cordeiro (Apr 04 2024 at 17:09):

Thanks!


Last updated: Nov 01 2025 at 14:11 UTC