Debug problem: Stack frame unavailable

I am unsure if this is a problem with Idea's debugger only, or a general
limitation of the VM's debugger API:
I sometimes pause an application (without a breakpoint being hit), to investigate
it's state. E.g. when an error dialogs is shown I pause the application, then
go to the "AWT-EventQueue-0" thread and view its frames. Now when I do "Show Frame"
on a stacktrace frame, Idea opens the frame view with variables.
However all variables display
"Stack frame unavailable Cannot evaluate ]]>.toString()".
I can inspect all variables just fine (expanding them and see values), but Idea
cannot evaluate any expression.

Can someone shed light on this?

3 comments

At least on J2ME this is a limit on the VM....

0

Yes, this is a known issue.
The problem is that when you pause an application, there is no thread that we can choose as a "currently executing thread" - JPDA
does not provide this information. IDEA uses the "current" thread as a context in which expressions are evaluated and methods are
called. The second problem is that even if we had a thread to evaluate methods in (for example, currently selected thread), we
could not do it since it is a JPDA requirement that the thread must be suspended because of some breakpoint event, and not paused
forcibly with pause().

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Stephen Kelvin" <mail@gremlin.info> wrote in message news:dm19ff$3d0$1@is.intellij.net...
>I am unsure if this is a problem with Idea's debugger only, or a general

limitation of the VM's debugger API:
I sometimes pause an application (without a breakpoint being hit), to investigate
it's state. E.g. when an error dialogs is shown I pause the application, then
go to the "AWT-EventQueue-0" thread and view its frames. Now when I do "Show Frame"
on a stacktrace frame, Idea opens the frame view with variables.
However all variables display
"Stack frame unavailable Cannot evaluate <classname>.toString()".
I can inspect all variables just fine (expanding them and see values), but Idea
cannot evaluate any expression.

>

Can someone shed light on this?



0

Thanks a lot for the detailed answer.
The first part should be manageable by Idea.
Do you know if there is an issue in Sun's Bug Tracker for the second
part?
Often times it may be a workaround to pause the application, then set a breakpoint
in the deepest stack frame for the thread and continue to hit the breakpoint.
Unfortunately that is not an option if the thread is in some library without
debug info and never returns to a higher stackframe with debug info...

Eugene Zhuravlev (JetBrains) wrote:

Yes, this is a known issue.
The problem is that when you pause an application, there is no thread that we can choose as a "currently executing thread" - JPDA
does not provide this information. IDEA uses the "current" thread as a context in which expressions are evaluated and methods are
called. The second problem is that even if we had a thread to evaluate methods in (for example, currently selected thread), we
could not do it since it is a JPDA requirement that the thread must be suspended because of some breakpoint event, and not paused
forcibly with pause().

0

Please sign in to leave a comment.