You can specify exit programs in the trace program parameter to extend the capability of the watch function.
Click these links to learn how you can implement exit programs: