Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to attach the debugger without the user interface
How to attach the debugger without the user interface [message #52194] Thu, 26 March 2009 13:18 Go to next message
vanni is currently offline vanniFriend
Messages: 4
Registered: July 2009
Junior Member
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 #52219 is a reply to message #52194] Thu, 26 March 2009 16:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

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 #52299 is a reply to message #52219] Fri, 27 March 2009 16:43 Go to previous message
vanni is currently offline vanniFriend
Messages: 4
Registered: July 2009
Junior Member
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 16:51 Go to previous message
Jacek Pospychala is currently offline Jacek PospychalaFriend
Messages: 159
Registered: July 2009
Senior Member
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 16:43 Go to previous message
vanni is currently offline vanniFriend
Messages: 4
Registered: July 2009
Junior Member
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.
Previous Topic:Class Cast Exception in plugin
Next Topic:getPackageFragmentRoots does not return dependent workspace plugins
Goto Forum:
  


Current Time: Fri Apr 19 00:08:53 GMT 2024

Powered by FUDForum. Page generated in 0.02149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top