Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Debugging the GMF generator
Debugging the GMF generator [message #113774] Thu, 22 March 2007 11:39 Go to next message
Eclipse UserFriend
Originally posted by: andrew.montalenti.morganstanley.com

I am currently evaluating GMF for use in building a graphical modeling
tool. I am working with the latest stable stream build (3.3M5) of
Eclipse, GMF 2.0M5uh and its dependencies.

I am running into situations in which certain .gmfmap files cause
NullPointerExceptions inside the GMF generator. I can see the stack
traces for these NPEs in my Eclipse log, but cannot find an easy way to
"debug" these problems so I can step through the code and see exactly
what's going wrong. I'd ultimately like to file informative bug reports
about these problems so that more informative error messages may be
logged, and less scary exceptions thrown.

The issue is that I'd like to debug my running Eclipse instance (that is,
set a breakpoint in the GMF generator, and have the debugger come up when
I click the "Generate Diagram Code" menu action). Is there any way to do
this?

Alternatively, is there some way, without creating a plug-in project which
depends upon the GMF generator, that I could use an Eclipse Application
launcher to start another instance of Eclipse where I could debug the
generator? I've searched through all the views for the Plug-In Registry,
etc. with little luck.

This is certainly more of a general Eclipse question, but I am asking it
here because I figure some GMF users/devs must have to do stuff like this
sometimes in order to get to the root of GMF problems.

Thanks for any help or pointers,

Andrew
Re: Debugging the GMF generator [message #113838 is a reply to message #113774] Thu, 22 March 2007 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andrew.montalenti.morganstanley.com

After extensive Googling, I found this great blog entry that answers my
question:

http://borisoneclipse.blogspot.com/2007/01/circular-debuggin g.html

You can certainly attach a debugger to the running JVM, but then if you
suspend the VM you will end up with a frozen Eclipse.

I use the following trick:

* Make my default Eclipse instance run as described in above blog link.
* Create a new launcher for Eclipse called "eclipse-debug.exe" which
executes a different workspace (C:\workspace-debug or some such).
* Create a debug launcher in this second Eclipse instance which
connects back to the first one.

I can now debug Eclipse actions in my main workspace using another Eclipse
instance. Nice.

I'm now running into issues where I can't have all the source code
available to get true line-by-line stepping, though I can pull in the
source of individual JARs one by one. I think there is some bad logic
with how Eclipse guesses at the source jar location. For example,
org.eclipse.gmf.codegen_2.0.0*.jar looks for its source jar in the same
directory (plugins), when in fact it is located in
org.eclipse.gmf.sdk.source*/src/org.eclipse.gmf.codegen_2.0. 0*/src.zip.

I'm going to see if I can work around this issue, but so far I'm much
farther along than I was before, thanks to that blog post.

Hope this is helpful for someone else.

Andrew
Re: Debugging the GMF generator [message #114111 is a reply to message #113774] Sat, 24 March 2007 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Hello Andrew,

> NullPointerExceptions inside the GMF generator. I can see the stack
> traces for these NPEs in my Eclipse log, but cannot find an easy way
Can you please post this trace here?

-----------------
Alex Shatalin
Re: Debugging the GMF generator [message #114439 is a reply to message #114111] Mon, 26 March 2007 12:13 Go to previous message
Eclipse UserFriend
Originally posted by: andrew.montalenti.morganstanley.com

Hi Alex,

I realized that I was running a somewhat older build of GMF (due to an
overzealous use of update sites). I upgraded to the latest 2.0M5 build
and this bug went away.

At the end of the day, I think it was related to using spaces in the name
of something (like a Figure). If I encounter the error again, I'll post
the stack trace here.

Andrew
Previous Topic:Remove scrolling in the compartment (nodes shall stay within compartment bounds)
Next Topic:GMF plugins generation and Eclipse versions
Goto Forum:
  


Current Time: Sun Jun 15 14:55:09 EDT 2025

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

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

Back to the top