blob: 449de22c0f67f283ea6ac1e2ca76fd89a80f1cdc [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<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 a 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 a <strong>Display</strong> or <strong>Inspect </strong>evaluation
is shown in a popup window. Note that <strong>Execute</strong> does not display
a result - the expression is just executed.</li>
<li>The result popup window can be dismissed by clicking outside of the popup
window or by pressing <strong>Esc</strong>. The result can be persisted to
the Display view (if <strong>Display</strong> was chosen) or Expressions view
(if <strong>Inspect</strong> was chosen) by pressing the key sequence shown
at the bottom of the popup window. For example, to move the result of an <strong>Inspect
</strong>evaluation to the Expressions view press <strong>CTRL-Shift-I</strong>.
Note that when the <strong>Display</strong> action is used from the Display
view the result is written to the Display view rather than a popup</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.png" alt="Related concepts" ><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.png" alt="Related tasks" ><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.png" alt="Related reference" ><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>
</body>
</html>