Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Running my debugger a 2nd time
Running my debugger a 2nd time [message #332329] Mon, 20 October 2008 00:25
Matt Gray is currently offline Matt GrayFriend
Messages: 13
Registered: July 2009
Junior Member
G'day,

I've implemented an IDE for a programming language, including debug launch
support.

I've based the debug support on the following Eclipse article:
http://www.eclipse.org/articles/Article-Debugger/how-to.html

Everything seems to work nicely - I can control our debugger, step through
code, stop at break points, look at the stack and memory, view source
code, etc, etc.

The problem I have is that on the 2nd and subsequent launches of the
debugger, the 'Debug' view doesn't seem to notice that anything is
happening. If I double click on the launched target in the Debug view, it
will suddenly notice that something is running, and put in the thread
information, and allow me to step. If I step once, the Debug view again
fails to update. I have to double click on the stack items or the thread
between each step to force the Debug window to update its view.

I've noticed that if I close the debug view completely between runs, it
appears to work as it should. Likewise, if I switch perspective away from
the Debug perspective between runs, it will work for the next debug run.
And of course, if I relaunch my IDE the first run of the debugger is fine.

Does anyone have any tips for me? I must be doing something silly...
One thing that I am doing differently is using a custom class for exec'ing
the commands I run - rather than using DebugPlugin.exec() (this is
basically due to our build system requiring Cygwin on Windows, so we are
trying to hide some of the mess).

Here's some (pseudo) code for my debug launcher:


PlatformUI.getWorkbench().showPerspective("org.eclipse.debug.ui.DebugPerspective ",
PlatformUI.getWorkbench().getActiveWorkbenchWindow());

SysCommandExecutor exec = new SysCommandExecutor();

String cmd = "some command to pre-compile stuff";
Process p = exec.runCommandHelper(cmd);
DebugPlugin.newProcess(launch, p, "Pre compile 1...");
p.waitFor();

cmd = "some command to link stuff";
p = exec.runCommandHelper(cmd);
DebugPlugin.newProcess(launch, p, "Linking...");
p.waitFor();

cmd = "some command to run my debugger on the linked file";
p = exec.runCommandHelper(cmd);
IProcess process= DebugPlugin.newProcess(launch, p, "Debug Run");
IStreamsProxy iSP = process.getStreamsProxy();

IDebugTarget target = new G12DebugTarget(launch,process,iSP );
launch.addDebugTarget(target);
DebugPlugin.getDefault().addDebugEventListener((IDebugEventS etListener)
target);
Previous Topic:Contribute Run External Program Actions via Plugin
Next Topic:How to provide a specific tab-style to move between editable cells
Goto Forum:
  


Current Time: Wed Apr 24 15:34:06 GMT 2024

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

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

Back to the top