Community
Participate
Working Groups
If you force a re-evaluation of a Watch item when the VM is suspended at a breakpoint and you have selected the Debug target you get: "Thread must be suspended by step or breakpoint to perform method invocation" in the details area. What exactly is it attempting to do in this case?
The problem is not with the re-evaluation (re-evaluation is not available when the debug target is selected), but with the toString in the detail pane. the test case is: when the VM is suspended at a breakpoint, select the debug target, then select an object in the variable view or in the expression view. The message will be displayed in the detail pane. To evaluate the toString of the value, a suspended thread is requiered. As the selection in the debug view is not on a thread or a stackframe, the current implementation try to find a suspended thread in the list of thread of the debug target. In this case, the selected thread is suspended, but not in valid state to performed a evaluation. A fix is to select a thread which is in a valid state, but I don't think the debugger know if the thread is in a valid state or not. DarinW: do you know if there is any way to select a 'good' thread ?
The variables view is not a problem - unless a stack frame is selected, nothing is displayed. This is only a problem in the expressions view (still thinking about solution).
The VM will not tell us if a thread has been suspended by a user event. We'd like to choose the thread in which the breakpoint occurred, but there may be no breakpoint (if the user has performed steps). The only option I see is keeping track of where the breakpoint/step suspends occurred. However, that is a "drastic" fix for a relatively rare problem. The workaround is to have the user select a "good" thread. We could just make this into a README. Propose no action immediately.
I agree to not change the code, but we should change the message to something more explicite (no idea of what to say).
The IJavaThread has a status code for this error condition - ERR_INVALID_THREAD_STATE. We can test for this and display a better message (but I have to come up with a better message).
For now, I'm going to say we do nothing, except provide a README. In the future we want to provide a better explanation.
Deferred
*** Bug 125673 has been marked as a duplicate of this bug. ***
Closing. When a target is selected the watch expression shows no value now (3.3). We only show a value when a context is provided that we can use to resolve the expression (thread or frame).
Marking as won't fix.
Darin, either you should reopen this again or reopen bug 125673 as the problem described in bug 125673 is not solved i.e. when manually stopping a thread I still get the same behavior as described there: the Variables view contains the values but the details pane is unusable (which is sort of explained but not very user friendly).