Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-debug-dev] StackFrames and Variables

In the course of trying to record some information when debugging I have an implementation of IJavaBreakpointListener. When my JavaMethodBreakpoints are hit I simply printout some information to the console. My breakpoints have been set up to not suspend execution of the debugee.

I have the following code to print out some information:

System.out.println
("<METHOD=\""+breakpoint.getMarker().getAttribute("METHOD").toString()+"\" ");

System.out.print
("SIGNATURE=\""+breakpoint.getMarker().getAttribute("SIG").toString()+"\" ");

System.out.print
("LINE=\""+breakpoint.getMarker().getAttribute(IMarker.LINE_NUMBER).toString()+"\"/>");

IJavaStackFrame[] frames = (IJavaStackFrame[]) thread.getStackFrames();
  for(int i=0;i<frames.length;i++){
      List variables = frames[i].getArgumentTypeNames();
      Iterator iter = variables.iterator();
          while(iter.hasNext()){
            System.out.println
	    ("<VARIABLE =\""+iter.next().toString()+"\"/>");
            }
   }

This is contained in my breakpointHit(..) method that always returns a result of IJavaBreakpointListener.DONT_SUSPEND. However this code seems to suspend the execution of the debugee. I launch the debugee by using the Debug As.. button in the Run-time Workbench, before this would execute the debugee without suspending the execution when the breakpoints were hit.

How can I get the information from StackFrames, Variables and their Values without suspending the execution of the debugee?

TIA for any help anyone can provide

Joe

(Note: I know the information for method/signature can be returned from the breakpoint itself, however I have annotated other information to the marker that I use it's just not shown here)



Back to the top