hazelcast / hazelcast-docker

This repository contains docker image for Hazelcast open-source in-memory data-grid.
Apache License 2.0
89 stars 82 forks source link

Consider convenience for debugging #69

Closed jerrinot closed 5 years ago

jerrinot commented 6 years ago

It would be nice to add some convenience for easy debugging.

My idea is to pass a parameter to the image to start JVM with JPDA port open + also expose this port somehow.

Then it would be easy to run the image locally and attach a debugger running on my host machine.

leszko commented 6 years ago

@jerrinot , do you have any particular use case in mind? I think that everything you mentioned is possible to do with the current Docker image:

What else do you need for debugging?

jerrinot commented 6 years ago

Maybe just a documentation would be sufficient. Use-Case: I represent a user who is mostly clueless about Docker. I just followed the current documentation, attempted to start a new instance, but it failed due https://github.com/hazelcast/hazelcast-docker/issues/68. My natural instinct was to connect a debugger to see what was going on. Well, I didn't know how:) I guess debugging is a common enough use-case to be included in the documentation and perhaps prepare some convenience if possible.

leszko commented 6 years ago

I see. Yeah, then you could run it again with the remote debug session from IntelliJ and check. I actually never debugged this way, since Dockerfile usually contains almost zero business logic, so it's simpler just to run the application directly from IntelliJ than run Docker container and configure remote debug.

Saying that, we can leave this issue open and document it, since it can be helpful.

ps-jay commented 6 years ago

I guess if we're turning this into a documentation issue, it would also be good to document how to open JMX & the JMX ports.