Results 1 to 6 of 6

Thread: Interactive debugging in Eclipse

  1. #1
    Join Date
    Jan 2009
    Posts
    7

    Default Interactive debugging in Eclipse

    What's the best way to do this? Is there a call to mvn which will put tomcat into debugging mode or have I just missed something in the documentation?

    Thanks.

  2. #2
    Join Date
    Jan 2009
    Posts
    7

    Default Getting closer- but still stuck with STS (Spring Tool Source IDE)

    Has nobody done this, or is this forum populated exclusively by bots and ghosts?!?

    At last, I've figured out the basics of Maven (always stayed away from it, until my desire to try ROO has forced me to confront it)... and found some documentation about debugging Maven projects in Eclipse (http://docs.codehaus.org/display/MAV...ipse-based+IDE) but this doesn't seem entirely relevant to the STS IDE which I downloaded for ROO...

    Surely, some documentation on debugging for ROO is *essential*?!?

  3. #3
    Join Date
    Jan 2009
    Posts
    7

    Default Connection to tomcat not showing source code

    OK. I want to connect to a webapp generated by ROO, because it seems that ROO has either made a mistake in the model or in its controllers and I want to find out which (and this seems like a good reason to get the debugger working).

    I now have the debugger connecting to tomcat by selecting the Debug as Maven build... option in STS, and adding :
    runjdwp transport=dt_socket
    address 3998
    in the Main parameter/values.

    However... my breakpoints are in an .aj file (one of the .aj's for generating the bean's getters/setters).

    When the breakpoint is reached, eclipse can't show me the source code because it thinks it's looking for a filename something like :

    BaseEdgeController_Roo_Controller.ajc$interMethod$ org.foo.bar_web_BaseEdgeController_Roo_Controller$ org.foo.bar_web_BaseEdgeController$create

    I guess this means that eclipse isn't correctly working with the aspects (i.e. the aspects are compiled into the .class files with those long method names, but eclipse can't then map back to the appropriate .aj file)?
    What can I do?
    Last edited by obobo; Sep 21st, 2009 at 06:20 AM.

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    We routinely debug Roo applications within Eclipse and Tomcat.

    The technique is to right-click the project and then select Debug As > Debug on Server, then select Tomcat and off you go. FYI set a breakpoint in ChoiceController_Roo_Controller.delete(Long) (as build from script vote.roo) and it took me into the debugger correctly.

    See attached screen shot for an example of debugger usage.
    Attached Images Attached Images
    Last edited by Ben Alex; Sep 23rd, 2009 at 09:29 PM.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  5. #5
    Join Date
    May 2009
    Posts
    12

    Default start tomcat in debug in maven?

    Quote Originally Posted by Ben Alex View Post
    We routinely debug Roo applications within Eclipse and Tomcat.

    The technique is to right-click the project and then select Debug As > Debug on Server, then select Tomcat and off you go.
    Curious.. do you know if you can issue something to the mvn tomcat:start command to get tomcat to listen for a debug connection?

  6. #6
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    I did a quick Google around but couldn't find any examples of using the Tomcat Maven Plugin in debug models. Just use it within STS/Eclipse, it'll be easier. :-)
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •