<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="_c74_vig.xsl" type="text/xsl"?>
<vignette name="Watchpoints" package="Max" rankfactor="2">
  <h1>
	Watchpoints
	</h1>
  <p>
	A <i>watchpoint</i> is an action you can attach to a patch cord.
</p>
  <p>
  	A <i>monitor watchpoint</i> is orange. It lets you monitor messages being sent through a patch cord.
  </p>
  <p>
    A <i>print watchpoint</i> is blue. It lets you monitor messages being sent
    through a patch cord, but also displays the messages in the
    <link type="vignette" module="core" name="max_window">Max Console</link>.
  </p>
  <p>
  	A <i>break watchpoint</i> is red. It suspends execution of your patch and opens the debug window. A watchpoint can, if desired, break <i>and</i> monitor at the same time. <link type="vignette" module="core" name="tracing_tools">More information on break watchpoints and stepping through patches using the debugger</link>.
  </p>
  <p>
The Watchpoints window shows all currently defined watchpoints. To see it, choose <b>Watchpoints</b> from the Debug menu.
</p>
  <p>
    <img src="images/watchpoints_1.png"/>
  </p>
  <p>
    <b>
      <i>Note: Watchpoints are automatically saved when you quit Max. By default, all Max patches open with debug mode disabled.
When debug mode is off, watchpoints are greyed out in an unlocked patcher and hidden in a locked patcher.</i>
    </b>
  </p>
  <a name="watchpointswindow"/>
  <h2>
	About the Watchpoints window:
	</h2>
  <p>
			The left column lists each current watchpoint, with color indicating its type and status.
		</p>
  <p>
			The <i>Action</i> column contains a pop-up menu for each watchpoint. You can change
			the type of watchpoint associated with this number (watch,  break, or watch/break)
			or disable the watchpoint by choosing none.
		</p>
  <p>
			The <i>Sender</i> column lists the source of the message to the watchpoint.
		</p>
  <p>
			The <i>Patcher</i> column lists the name of the patcher where the watchpoint is located.
		</p>
  <p>
			The <i>Value</i> column displays any messages a watchpoint receives.
		</p>
  <p>
			The <i>Count</i> column displays the number of messages received by a watchpoint
			since it was inserted or made active.
		</p>
  <p>
			When the watchpoint mode is set to watch/break, the History column displays the
			three most recent messages received by a watchpoint
		</p>
  <br/>
  <bluebox>
    <h2>
	Adding a watchpoint
	</h2>
    <ul>
      <li>
			Select the patchcord or patchcords you want to insert watchpoints on and choose
			<b>Add Watchpoint – Monitor</b> or <b>Add Watchpoint – Break</b> from the Debug menu. A new
			numbered watchpoint marker will be added to the patchcord.
		</li>
    </ul>
    <p>
      <img src="images/watchpoints_2.png"/>
    </p>
  </bluebox>
  <br/>
  <bluebox>
    <h2>
	Removing a watchpoint
	</h2>
    <ul>
      <li>
			Select the patchcord or patchcords that contain the watchpoints you want to
			remove and choose <b>Remove Watchpoint</b> from the Debug menu. The watchpoint marker
			will disappear and its entry in the Watchpoint window will be removed (note that the
			watchpoints are not renumbered. If you add a new watchpoint, the number will be reused).
		</li>
    </ul>
    <p>
			You can remove all the watchpoints in the active patcher by choosing <b>Remove All Watchpoints</b>
			from the Debug menu.
		</p>
  </bluebox>
  <br/>
  <bluebox>
    <h2>
	Disabling a watchpoint
	</h2>
    <ul>
      <li>
			Select the patch cord that contains the watchpoints you want to disable
			and choose <b>Disable Watchpoint</b> from the Debug menu. The watchpoint marker on the patch cord will turn gray to indicate it is disabled.
		</li>
    </ul>
  </bluebox>
  <br/>
</vignette>
