| 
| How to attach the debugger without the user interface [message #52194] | Thu, 26 March 2009 09:18  |  | 
| Eclipse User  |  |  |  |  | Hi, I'm trying to make a plugin witch can attach automatically the eclipse debugger to remote process.
 My plugin has the address and port number of the jvm to debug (port number
 defined at jvm launch with the vm arguments).
 I would like to know if it's possible to attach automatically the debugger
 with this informations without using the debug configuration dialog.
 Thanks.
 |  |  |  | 
|  | 
| 
| Re: How to attach the debugger without the user interface [message #52299 is a reply to message #52219] | Fri, 27 March 2009 12:43  |  | 
| Eclipse User  |  |  |  |  | Thanks, it's ok! I have used an existing LaunchConfiguration (with the LaunchManager) to
 get a ILaunchConfigurationWorkingCopy.
 After I have set the IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP
 attribute with a HashMap which contains the hostname and the port number.
 This WorkingCopy create a new LaunchConfiguration (when the doSave()
 method is called) that the plugin uses to attach the debugger.
 |  |  |  | 
| 
| Re: How to attach the debugger without the user interface [message #594040 is a reply to message #52194] | Thu, 26 March 2009 12:51  |  | 
| Eclipse User  |  |  |  |  | Vanni, so you'd basically like to do Debug>Debug Remote Java Application
 programatically, correct?
 
 Then let's find out how does Debug Remote Java Application launch
 configuration work. Launch configurations are all registered in
 org.eclipse.debug.core.launchConfigurationTypes extension point.
 
 Let's then go to Plug-in Registry view, switch to Extension Points mode,
 find org.eclipse.debug.core.launchConfigurationTypes extension point.
 You'll see that plugin org.eclipse.jdt.launching extends it with
 org.eclipse.jdt.launching.remoteJavaApplication launch config.
 This launch config declares that all the delegate implementation is in
 class
 org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaun chConfigurationDelegate
 in org.eclipse.jdt.launching plug-in.
 
 So let's have a look at that class and implement something similar like
 there in your own plugin.
 
 Hope this helps.
 
 
 vanni pisze:
 > Hi, I'm trying to make a plugin witch can attach automatically the
 > eclipse debugger to remote process.
 > My plugin has the address and port number of the jvm to debug (port
 > number defined at jvm launch with the vm arguments).
 > I would like to know if it's possible to attach automatically the
 > debugger with this informations without using the debug configuration
 > dialog.
 > Thanks.
 >
 |  |  |  | 
| 
| Re: How to attach the debugger without the user interface [message #594066 is a reply to message #52219] | Fri, 27 March 2009 12:43  |  | 
| Eclipse User  |  |  |  |  | Thanks, it's ok! I have used an existing LaunchConfiguration (with the LaunchManager) to
 get a ILaunchConfigurationWorkingCopy.
 After I have set the IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP
 attribute with a HashMap which contains the hostname and the port number.
 This WorkingCopy create a new LaunchConfiguration (when the doSave()
 method is called) that the plugin uses to attach the debugger.
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.04483 seconds