|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
|
2 <html lang="en"> |
|
3 |
|
4 <head> |
|
5 <meta http-equiv="Content-Language" content="en-us"> |
|
6 <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> |
|
7 <meta name="ProgId" content="FrontPage.Editor.Document"> |
|
8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
9 <title>Adding watchpoints</title> |
|
10 <link rel="stylesheet" type="text/css" href="../help.css"> |
|
11 </head> |
|
12 |
|
13 <body> |
|
14 |
|
15 <h1>Adding watchpoints</h1> |
|
16 |
|
17 <p>A watchpoint is a special breakpoint that stops the execution of an |
|
18 application whenever the value of a given expression changes, without specifying |
|
19 where it might occur. Unlike breakpoints (which are line-specific), watchpoints |
|
20 are associated with files. They take effect whenever a specified condition is |
|
21 true, regardless of when or where it occurred. You can set a watchpoint on a global variable by highlighting the variable in the editor, or by selecting it in the Outline view. </p> |
|
22 |
|
23 <p>To set a watchpoint on a global variable:</p> |
|
24 |
|
25 <ol> |
|
26 <li>Highlight the variable in the editor, or select it in the Outline view.</li> |
|
27 <li>Click <b>Run > Toggle Watchpoint</b>.</li> |
|
28 <li>Do any of the following:</li> |
|
29 <ul><li>To stop execution when the watch expression is read, select the |
|
30 <b>Read</b> check box.</li> |
|
31 <li>To stop execution when the watch expression is written to, select the <b>Write</b> |
|
32 check box.</li></ul> |
|
33 <li>The watchpoint appears in the <b>Breakpoints</b> view |
|
34 list.</li> |
|
35 </ol> |
|
36 |
|
37 <p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21"> |
|
38 <br> |
|
39 <a href="../concepts/cdt_c_over_cdt.htm">C/C++ Development perspective</a></p> |
|
40 <p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21"> |
|
41 <br> |
|
42 <a href="cdt_o_brkpnts_watch.htm">Using breakpoints and watchpoints</a></p> |
|
43 <p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21"> |
|
44 <br> |
|
45 <a href="../reference/cdt_o_run_dbg_pages.htm">Run and Debug dialog box</a></p> |
|
46 |
|
47 <img src="../images/ng00_04a.gif" ALT="QNX Copyright Statement" > |
|
48 |
|
49 </body> |
|
50 |
|
51 </html> |