Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Debugging a child eclipse withOpenFileFeature?

Note that PDE's "Eclipse Application" launch configuration doesn't use the 
Eclipse launcher.

To debug a command-line application like the eclipse[.exe] executable, you 
have to launch it from the command line or via an External Tools launch 
configuration, pass some special VM arguments, and then use a Remote Java 
Application debug configuration to connect to the running instance.

See https://wiki.eclipse.org/IRC_FAQ#Attaching_to_a_running_instance

Unfortunately, it's not trivial to set up a command line that launches a 
runtime workbench like PDE would. You can either:
 (a) build your complete product and launch that one with the remote 
debugging arguments, or
 (b) debug an "Eclipse Application" launch config, and then look at the 
command line of that launch (Debug view, context menu item Properties on 
the launched process). You need to adapt that command line a bit: Append 
-vmargs to the end, use the -launcher argument as executable, move the 
initial arguments (up to before -classpath) to the end, remove the 
reference to the Main class and the -classpath and -launcher arguments, 
and don't forget to add the ",server=y" in 
"-agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=localhost:8000".

HTH
Markus


platform-ui-dev-bounces@xxxxxxxxxxx wrote on 2016-11-28 18:40:33:

> From: Jonah Graham <jonah@xxxxxxxxxxxxxxxx>
> To: "Eclipse Platform UI component developers list." 
<platform-ui-dev@xxxxxxxxxxx>
> Date: 2016-11-28 18:41
> Subject: Re: [platform-ui-dev] Debugging a child eclipse with 
OpenFileFeature?
> Sent by: platform-ui-dev-bounces@xxxxxxxxxxx
> 
> Hi Ian,
> 
> It is the C eclipse(.exe) that handles  --launcher.openFile and sends
> the path to a hidden SWT window. Not sure how to reproduce that when
> launching from within Eclipse as that bypasses the launcher.
> 
> Have a look at reuseWorkbench in
> features/org.eclipse.equinox.executable.feature/library/*/eclipse*.c
> (* is platform), this is in the equinox/rt.equinox.framework git repo.
> 
> The receiver (for gtk) is in
> org.eclipse.swt.widgets.Display.signalProc(long, long, long), probably
> in similar places for other platforms.
> 
> Jonah
> ~~~
> Jonah Graham
> Kichwa Coders Ltd.
> www.kichwacoders.com
> 
> 
> On 28 November 2016 at 17:26, Ian Pun <ipun@xxxxxxxxxx> wrote:
> > Hi, I'm trying to work my child eclipse to run with a path at the end 
of it
> > much like how it is done through opening eclipse through command line:
> >
> > ./eclipse /some/path/to/file
> >
> > I read a bit into this: 
https://wiki.eclipse.org/Eclipse/OpenFileFeature ,
> > which documents how to do it. But, putting --launcher.openFile with 
the
> > absolute path next to it in "Program Arguments"  of my test 
configurations
> > does not open the file.
> >
> > Any suggestions?
> >
> > --
> > Ian Pun
> > Software Engineering Intern at Red Hat
> > Eclipse Team
> >
> > _______________________________________________
> > platform-ui-dev mailing list
> > platform-ui-dev@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or 
unsubscribe from
> > this list, visit
> > https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe 
from this list, visit
> https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> 




Back to the top