Bug 517653 - Show copy & pasteable -agentlib:jdwp option Remote Java Application debug configuration
Summary: Show copy & pasteable -agentlib:jdwp option Remote Java Application debug con...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Andreas Sewe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-01 11:40 EDT by Andreas Sewe CLA
Modified: 2018-04-13 02:53 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sewe CLA 2017-06-01 11:40:29 EDT
This would IMHO be a nice usability improvement:

When the user create a new "Remote Java Application" debug configuration, show a copy & pasteable command-line argument to connect to the remote VM

  -agentlib:jdwp=transport=dt_socket,address=$HOST:$PORT,server=y,suspend=y

pre-filled with "Host" and "Port" from the Connection Properties". I find myself googling for the exact argument a lot.

(Granted, this command-line argument is JVM-specific, but for the most common case, the above would be enough.)
Comment 1 Andrey Loskutov CLA 2017-06-02 10:40:40 EDT
Good idea. This could go into the not editable text area below the connection properties. Do you want to contribute? The patch will be in org.eclipse.jdt.debug.ui.launchConfigurations.JavaConnectTab
Comment 2 Andreas Sewe CLA 2017-06-02 10:47:46 EDT
(In reply to Andrey Loskutov from comment #1)
> Good idea. This could go into the not editable text area below the
> connection properties. Do you want to contribute? The patch will be in
> org.eclipse.jdt.debug.ui.launchConfigurations.JavaConnectTab

I can try. Let's see whether the wiki [1] is sufficient to get me started.

[1] <https://wiki.eclipse.org/Debug/Developers#Contributing_to_JDT_or_Platform_Debug>
Comment 3 Andreas Sewe CLA 2017-06-02 11:42:01 EDT
(In reply to Andrey Loskutov from comment #1)
> Good idea. This could go into the not editable text area below the
> connection properties. Do you want to contribute? The patch will be in
> org.eclipse.jdt.debug.ui.launchConfigurations.JavaConnectTab

Looks like this is more complicated than just adding a Label to a Group. The contents of the "Connection Properties" group are generated dynamically based on the registered org.eclipse.jdt.launching.vmConnectors extensions.

The nicest solution would be adding a IVMConnector.getConnectionHint(Map<String, String>) or getConnectionHint(Map<String,Connector.Argument>) method, that returns a hint based on the arguments the user has entered in the UI so far. AFAICT, this would require adding an IVMConnectorExtension interface, however, to not break existing implementers of IVMConnector.

Thoughts?
Comment 4 Sarika Sinha CLA 2017-06-07 05:58:21 EDT
(In reply to Andreas Sewe from comment #3)
> (In reply to Andrey Loskutov from comment #1)
> > Good idea. This could go into the not editable text area below the
> > connection properties. Do you want to contribute? The patch will be in
> > org.eclipse.jdt.debug.ui.launchConfigurations.JavaConnectTab
> 
> Looks like this is more complicated than just adding a Label to a Group. The
> contents of the "Connection Properties" group are generated dynamically
> based on the registered org.eclipse.jdt.launching.vmConnectors extensions.
> 
> The nicest solution would be adding a
> IVMConnector.getConnectionHint(Map<String, String>) or
> getConnectionHint(Map<String,Connector.Argument>) method, that returns a
> hint based on the arguments the user has entered in the UI so far. AFAICT,
> this would require adding an IVMConnectorExtension interface, however, to
> not break existing implementers of IVMConnector.
> 
> Thoughts?

please attach a gerrit with this suggestion and we can see the impact.
Comment 5 Sarika Sinha CLA 2018-04-13 02:53:50 EDT
Moving out of 4.8.