MATLAB POLYSPACE 7 Przewodnik Instalacji Strona 428

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 427
6 Editing and Debugging M-Files
Disabling and Enabling Breakpoints. You can disable selected
breakpoints so the prog ram temporarily ignores them and runs uninterrupted,
for example, after you think you identified and corrected a problem. This is
especially useful for conditional breakpoints see “Conditional Breakpoints”
on page 6-126.
To disable a breakpoint, right-click the breakpoint icon and select Disable
Breakpoint from the contex t menu, or click anywhere in a line and select
Enable/Disable Breakpoint from th e Debug or context menu. You can also
disable a conditional breakpoint by clicking the breakpoint icon. This puts
an
X through the breakpoint icon as shown here.
After disabling a breakpoint, you can enable it to make it active again, or clear
it. To enable it, right-click the breakpoint ico n and select Enable Breakpoint
from the context menu, or click anywhere in a line and select Enable/Disable
Breakpoint from the Breakpoints or context menu. The
X no longer
appears on the breakpoint icon and program execution will pause at that line.
When you run
dbstatus, the resulting message for a disabled breakpoint is
Breakpoint on line 10 has conditional expression 'false'.
Clearing (Removing) Breakpoints. All breakpoints remain in a file until
you clear (remove) them or until they are automatically cleared. Clear a
breakpoint after d ete rmining that a lineofcodeisnotcausingaproblem.
To clear a breakpoint in the Editor/Debugger, click anywhere in a line
and select Set/Clear Breakpoint from the Debug or context menu. The
breakpoint for that line is cleared. Another way to clear a break point is to
click a standard bre akpoint icon, or a disabled conditio nal breakpoint icon.
To clear all breakpoints in all files, select Debug > Clear Breakpoints in
All Files, or click its equivalent button
on the toolbar.
The function that clears breakpoints is
dbclear. To clear all breakpoints, use
dbclear all. For the example, clear all of the breakpo in t s in collatzplot
by typing
6-120
Przeglądanie stron 427
1 2 ... 423 424 425 426 427 428 429 430 431 432 433 ... 617 618

Komentarze do niniejszej Instrukcji

Brak uwag