Managing breakpoints.
Sébastien Granjoux
seb.sfo@free.fr
Philip Chimento
philip.chimento@gmail.com

# ブレークポイント

Breakpoints are used to stop the execution of the program at a particular point so that the state of the program can be examined at those locations.

# Listing breakpoints

From the main menu, select View Breakpoints to open the Breakpoint window.

This view has the following columns:

## 位置

ソース ファイルのブレークポイントの位置です。デバッガーによりブレークポイントが設定されると、そのブレークポイントがどの関数に含まれるか等の、追加情報を得ることができます。

## アドレス

この項目にはデバッガーにより設定された、ブレークポイントのアドレスがセットされます。

## タイプ

This always displays breakpoint. It will be used in a future release supporting different kinds of breakpoints.

## 条件

ブレークポイントの条件です。条件が設定されていない場合は何も表示されません。

## 通過する回数

デバッガーが実行されていない場合、ブレークポイントを通過する回数が表示されます。設定されていない場合は、0が表示されます。

デバッガーが実行中の場合、通過する回数が0のときはプログラムがそのブレークポイントを通過した回数が表示されます。通過する回数に0以外を設定した場合は、通過した回数と右側に設定した回数が表示されます。

## 状態

This is the state of the breakpoint. It may be

## Pending:

the breakpoint is not set in your program.

## Permanent:

the breakpoint is set (its id number is displayed in parentheses).

## Temporary:

the breakpoint is set but will be deleted if reached.

All breakpoints are kept across Anjuta sessions even if they correspond to a non-existing locations, for example in a source file of a shared library not loaded yet. In this case their states are set as pending.

# Setting breakpoints

From the main menu, select Debug Add Breakpoint... or right click in the Breakpoint window and select Add Breakpoint....

Fill in the Location, which is the position of the breakpoint, and the other fields if desired. If a file is currently opened in the editor, the Location defaults to the current line. See for more information.

Another solution is to use the toggle breakpoint function. If there is no breakpoint on the current line, it will add one. Otherwise, it will remove it.

From the main menu, select Debug Toggle Breakpoint or right click in the Editor window and select Toggle Breakpoint.

# Editing breakpoints

You can't change the location of a breakpoint; create a new breakpoint instead. However, you can change the break condition or the pass count. To edit a breakpoint:

Select a breakpoint in the Breakpoint window.

Right click in the Breakpoint window and select Edit Breakpoint....

Change the Condition or Pass Count fields and click on OK when you are done. See for more information.

# Removing breakpoints

You can remove a breakpoint using the toggle breakpoint function described above. However, if you want to remove more than one breakpoint or the breakpoint is in a different file than the one you are editing, you can use the breakpoint window:

Select a breakpoint in the Breakpoint window.

Right click in the Breakpoint window and select Remove Breakpoint.

To remove all breakpoints:

From the main menu, select Debug Remove All Breakpoints or right-click in the Breakpoint window and select Remove All Breakpoints.

# Enabling and disabling breakpoints

Sometimes you might want to disable a breakpoint temporarily instead of deleting it altogether. To disable or re-enable a breakpoint:

Click on the Enable checkmark in the Breakpoint window or right click in the Breakpoint window and select Enable Breakpoint or Disable Breakpoint.

You can disable all breakpoints using:

From the main menu, select Debug Disable All Breakpoints or right-click in the Breakpoint window and select Disable All Breakpoints.