| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> |
| <title> |
| Evaluating expressions |
| </title> |
| </head> |
| <body> |
| <h1> |
| Evaluating expressions |
| </h1> |
| <p>When the VM suspends a thread (due to hitting a breakpoint or stepping |
| through code), you can evaluate expressions in the context of that thread's |
| stack frame. |
| </p> |
| <ol> |
| <li> |
| Select the stack frame in which an evaluation is to be performed. For the detail panes of the <strong>Variables</strong> and <strong>Expressions</strong> views, the |
| evaluation context will be a selected variable. If no variable is selected, the selected stack frame will be the context. |
| </li> |
| <li> |
| Expressions can be entered and evaluated in the following areas: |
| <ul> |
| <li> |
| <strong>Display</strong> view |
| </li> |
| <li> |
| Detail pane of the <strong>Expressions</strong> view |
| </li> |
| <li> |
| Detail pane of the <strong>Variables</strong> view |
| </li> |
| <li> |
| Java editor when it is displaying source and it is not read-only |
| </li> |
| </ul> |
| </li> |
| <li> |
| Select the expression to be evaluated and select <strong>Display</strong>, <strong>Inspect</strong> or <strong>Execute</strong> from the context pop-up menu. The |
| result of evaluating the expression is shown in the Display view (if <strong>Display</strong> was chosen), or in the Expressions view (if <strong>Inspect</strong> was |
| chosen). |
| </li> |
| </ol> |
| <p><strong>Note:</strong> Evaluations cannot be performed in threads that have been manually suspended.</p> |
| <p> |
| <img border="0" src="../images/ngrelc.gif" alt="Related concepts" width="159" height="27"><br> |
| <a href="../concepts/concepts-10.htm">Debugger</a><br> |
| <a href="../concepts/concepts-7.htm">Java editor</a> |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelt.gif" alt="Related tasks" width="159" height="27"><br> |
| <a href="../tasks/tasks-134.htm">Suspending threads</a><br> |
| <a href="../tasks/tasks-135.htm">Resuming the execution of suspended threads</a> |
| </p> |
| <p> |
| <img border="0" src="../images/ngrelr.gif" alt="Related reference" width="159" height="27"><br> |
| <a href="../reference/ref-52.htm">Display view</a><br> |
| <a href="../reference/ref-56.htm">Expressions view</a><br> |
| <a href="../reference/ref-56c.htm">Expressions view Show Detail Pane</a><br> |
| <a href="../reference/ref-74.htm">Variables view</a><br> |
| <a href="../reference/ref-showdetailpane.htm">Variables view Show Detail Pane</a> |
| </p> |
| <p> |
| <a href="../hglegal2003.htm"><img src="../images/ngibmcpy2003.gif" alt="Copyright (c) 2000, 2003 IBM Corporation and others. All Rights Reserved." border="0" width="324" height= |
| "14"></a> |
| </p> |
| </body> |
| </html> |
| |