facebook

Debugging a dependency in Smart deployment [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #210012 Reply

    andyrut
    Member

    Not sure if this is an Eclipse or MyEclipse Workbench issue. I’m using MyEclipse Workbench 2.8 Beta 1 and Eclipse version 2.0.

    I’ve got a Web Module that has a Java Project on its build path. When I deploy the project (with Smart deployment enabled), all the class files from the dependent Java Project are copied just fine and the deployment runs great – this Smart deployment feature is awesome, by the way.

    I have break points set in the dependency Java Project, and my goal is to be able to debug this code. When I run it through debug mode, the program does indeed stop at the appropriate break points, but the source file editor is not brought up at all, and there’s no arrow cursor next to where I’ve placed the breakpoint.

    When I perform a step in, out, over the code, the thread stack seems to follow it, but the arrow cursor doesn’t follow it through the source code. (also, upon the first step over, I get a message which reads “Unable to retrieve stack frame – thread not suspended”) I am also unable to see what the current variables are set to. The line numbers in the thread stack match up with the numbers in the source code, however, so it doesn’t seem as if it’s completely lost track of what source files the deployment came from.

    Anyways, I was just curious if anyone else had tried debugging a dependency in a smart deployment or if it’s even supported in Eclipse/MyEclipse.

    #210013

    Riyad Kalla
    Member

    I’m using MyEclipse Workbench 2.8 Beta 1 and Eclipse version 2.0.

    Did you meant Eclipse 2.1? And if so, what subrelease? MyEclipse 2.8 is intended for Eclipse 2.1 release, that’s why I ask.

    this feature is awesome, by the way.

    Thanks! A lot of users wanted it, and we tried to ban them all from the forums, but just decided to add it instead 😉

    Anyways, I was just curious if anyone else had tried debugging a dependency in a smart deployment or if it’s even supported in Eclipse/MyEclipise.

    Let me check if this is a known limitation.

    #210016

    andyrut
    Member

    @support-rkalla wrote:

    Did you meant Eclipse 2.1? And if so, what subrelease? MyEclipse 2.8 is intended for Eclipse 2.1 release, that’s why I ask.

    I’ve also tried it with Eclipse 2.1.3, with the same results.

    Thanks! A lot of users wanted it, and we tried to ban them all from the forums, but just decided to add it instead 😉

    Laff! 🙂 We use a lot of similar code in all of our Web Modules, so having a dependent project with this smart deployment option makes our development process significantly easier.

    #210018

    Scott Anderson
    Participant

    Andy,

    When the breakpoint is hit, can you doubl-click on the line in the stack in the Breakpoints View and see if that causes the source file to be opened?

    #210024

    andyrut
    Member

    When I double-click on the line in the Breakpoints View (one of the tabs in the window to the right of the thread stack), it opens the source file just fine. I can do this while I’m not actually running the program, too.

    Curiously, when I single-click the stack thread line from the Java Project’s function in the Debug View, it gives me “An out of memory error has occured”. Single-clicking the stack thead line from the Web Module’s function opens up the source file just fine.

    Would screenshots help in describing this issue?

    #210027

    Scott Anderson
    Participant

    Andy,

    Are any log entries generated to <workspace>/.metatdata/.log? After you double-click to open the file, does stepping with the debugger highlight it properly?

    #210028

    andyrut
    Member

    The contents of the .log file after starting Tomcat in debug mode and single-clicking the “dependent thread in Debug View:

    !ENTRY org.eclipse.ui 4 4 Jul 14, 2004 16:30:29.168
    !MESSAGE Unhandled exception caught in event loop.
    !ENTRY org.eclipse.ui 4 0 Jul 14, 2004 16:30:29.168
    !MESSAGE Failed to execute runnable (java.lang.OutOfMemoryError)
    !STACK 0
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError)
    at org.eclipse.swt.SWT.error(SWT.java:2330)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:101)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1999)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1733)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
    at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
    at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
    at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
    at org.eclipse.core.launcher.Main.run(Main.java:747)
    at org.eclipse.core.launcher.Main.main(Main.java:583)
    !ENTRY org.eclipse.ui 4 4 Jul 14, 2004 16:30:29.168
    !MESSAGE
    *** Stack trace of contained exception ***
    !ENTRY org.eclipse.ui 4 0 Jul 14, 2004 16:30:29.168
    !MESSAGE java.lang.OutOfMemoryError
    !STACK 0
    java.lang.OutOfMemoryError
    !ENTRY org.eclipse.ui 4 4 Jul 14, 2004 16:31:13.91
    !MESSAGE Unhandled exception caught in event loop.
    !ENTRY org.eclipse.ui 4 0 Jul 14, 2004 16:31:13.91
    !MESSAGE java.lang.OutOfMemoryError
    !STACK 0
    java.lang.OutOfMemoryError

    After double-clicking the file from Breakpoint View, stepping with the debugger does not highlight the source file properly.

    #210029

    Riyad Kalla
    Member

    Do you use any VM args to give Eclipse more mem? 3.0 uses considerably more memory than 2.1 and when it first came out “OOM” exceptions in the Eclipse forums were a pretty popular subject, so this might be a legit OOM section…

    You can try adding “-vmargs -Xms128M -Xms256M” to your shortcut used to launch eclipse, that may help.

    #210030

    Scott Anderson
    Participant

    Agreed. Once you start running out of memory, nothing will work as expected.

    #210039

    andyrut
    Member

    Excellent! When I used:

    eclipse.exe -vmargs -Xmx256M

    it seems to be working fine. Thanks for your help!

    #210048

    Riyad Kalla
    Member

    Awesome, that’s like [22 Support-Team] to [0 Bugs] for today…

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Debugging a dependency in Smart deployment [Closed]

You must be logged in to post in the forum log in