2011-03-31 13:59:18 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2003-11-28 21:50:02 +00:00
< html lang = "en" >
< head >
< meta http-equiv = "Content-Language" content = "en-us" >
< meta name = "GENERATOR" content = "Microsoft FrontPage 5.0" >
< meta name = "ProgId" content = "FrontPage.Editor.Document" >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" >
< title > Adding watchpoints< / title >
< link rel = "stylesheet" type = "text/css" href = "../help.css" >
< / head >
< body >
2012-09-19 17:16:24 -04:00
< div role = "main" > < h1 > Adding watchpoints< / h1 >
2003-11-28 21:50:02 +00:00
< p > A watchpoint is a special breakpoint that stops the execution of an
application whenever the value of a given expression changes, without specifying
2007-06-19 19:34:42 +00:00
where it might occur. Unlike breakpoints (which are line-specific), watchpoints
2003-11-28 21:50:02 +00:00
are associated with files. They take effect whenever a specified condition is
2007-06-19 19:34:42 +00:00
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 >
2003-11-28 21:50:02 +00:00
2005-08-09 19:55:59 +00:00
< p > To set a watchpoint on a global variable:< / p >
2003-11-28 21:50:02 +00:00
< ol >
2007-06-19 19:34:42 +00:00
< li > Highlight the variable in the editor, or select it in the Outline view.< / li >
2010-03-31 01:34:27 +00:00
< li > Click < strong > Run > Toggle Watchpoint< / strong > .< / li >
2011-03-31 13:59:18 +00:00
< li > Do any of the following:
2007-06-19 19:34:42 +00:00
< ul > < li > To stop execution when the watch expression is read, select the
2010-03-31 01:34:27 +00:00
< strong > Read< / strong > check box.< / li >
< li > To stop execution when the watch expression is written to, select the < strong > Write< / strong >
2003-11-28 21:50:02 +00:00
check box.< / li > < / ul >
2011-03-31 13:59:18 +00:00
< / li >
2010-03-31 01:34:27 +00:00
< li > The watchpoint appears in the < strong > Breakpoints< / strong > view
2003-11-28 21:50:02 +00:00
list.< / li >
< / ol >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngconcepts.gif" ALT = "Related concepts" width = "143" height = "21" >
2003-11-28 21:50:02 +00:00
< br >
2004-06-24 20:26:35 +00:00
< a href = "../concepts/cdt_c_over_cdt.htm" > C/C++ Development perspective< / a > < / p >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngtasks.gif" ALT = "Related tasks" width = "143" height = "21" >
2003-11-28 21:50:02 +00:00
< br >
2007-06-19 19:34:42 +00:00
< a href = "cdt_o_brkpnts_watch.htm" > Using breakpoints and watchpoints< / a > < / p >
2011-03-31 13:59:18 +00:00
< p > < img src = "../images/ngref.gif" ALT = "Related reference" width = "143" height = "21" >
2003-11-28 21:50:02 +00:00
< br >
< a href = "../reference/cdt_o_run_dbg_pages.htm" > Run and Debug dialog box< / a > < / p >
2007-06-19 19:34:42 +00:00
< img src = "../images/ng00_04a.gif" ALT = "QNX Copyright Statement" >
2003-11-28 21:50:02 +00:00
2012-09-19 17:16:24 -04:00
< / div > < / body >
2003-11-28 21:50:02 +00:00
< / html >