1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
* Copyright � 2007 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
9
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
10
<title>Syntax Rules for Setting a Condition on a Breakpoint</title>
11
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
15
<h2>Syntax Rules for Setting a Condition on a Breakpoint</h2>
16
<p><small><a href="#seealso">See Also</a></small></p>
18
<p>A condition is a Boolean expression set on a breakpoint that triggers the breakpoint when the expression evaluates to True.
19
You can set a condition on the following types of Java breakpoints:</p>
27
<p>The condition must follow Java syntax rules.
28
The condition can include anything allowed to be on the right side of the equal sign (=).
29
The condition can also include variables and methods that are in the current context.
30
The following restrictions apply to breakpoint conditions: </p>
33
<li>Imports are ignored. You must use fully qualified names, such as <tt>obj</tt>, <tt>instanceof</tt>, or <tt>java.lang.String</tt>. </li>
34
<li>You cannot access outerclass methods and variables directly. Use <tt>this.</tt><i><tt>variableName</tt></i> or <tt>this$1</tt>.</li>
37
<p>You can set a condition by using the New Breakpoint dialog box or the breakpoint's Properties window.
38
The Source Editor identifies a conditional breakpoint with the symbol <img src="images/ConditionalBreakpoint.gif" alt="Conditional breakpoint icon">.</p>
41
<dt><a name="seealso">See Also</a></dt>
42
<dd><a href="CSH/breakpoint_method.html">New Breakpoint Dialog Box: Method</a></dd>
43
<dd><a href="CSH/breakpoint_exception.html">New Breakpoint Dialog Box: Exception</a></dd>
44
<dd><a href="CSH/breakpoint_variable.html">New Breakpoint Dialog Box: Field</a></dd>
47
<small><a href="../credits.html">Legal Notices</a></small>
48
<table cellpadding="50" border="0">