Debug port field in Docker Run configuration

Answered

 In Idea 2017.3 (I'm using 2017.3.2) the "Debug port" field has disappeared from the Docker Run configuration page.

 

Is this intended and if so is there another way to set the debug port (without having to manually edit the "workspace.xml" file in the .idea folder)?

2
7 comments

See https://youtrack.jetbrains.com/issue/IDEA-171370#comment=27-2200303:

> Also I suggest to remove Debug port since it doesn't really work currently and it is not really clear how it should.

1

How can I manually edit the workspace.xml to include the debug port?  Are there any plans to add a java debug tab to the docker run configuration section?

0

You can add <option name="debugPort" value="[port]" /> to the settings section of you run configuration. I don't know if this is necessary to debug remote.

Just be aware, though, that Idea will mark the run configuration with a warning.

0

I tried to add that and I do see a warning like: "Warning: Debug port forwarding not found".  If I click the debug button, in the deploy log, I see "Cannot retrieve debug connection: java.net.MalformedURLException: unknown protocol: unix".   By the way, I'm able to still remotely debug my JVM in my docker container by having a separate "Remote Debug Configuration".  Would be nice to just be able to configure the docker run configuration to do this for me though.  A little less amount of things to manage once you get into multiple services.

1
Part of my workspace.xml run configuration for context.
 
<configuration name="technician-svc debug" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
<deployment type="dockerfile">
<settings>
<option name="JSONFilePath" value="" />
<option name="command" value="-agentlib:jdwp=transport=dt_socket,address=50505,suspend=n,server=y" />
<option name="containerName" value="technician-svc" />
<option name="contextFolderPath" value="technician-svc/build/libs" />
<option name="debugPort" value="50505" />
 
 
1

At the moment I use remote debugging for docker images too but I agree that it would nice to be able to configure it in the docker run configuration.

0

Please sign in to leave a comment.