Supported on windows
Supported on linux
Supported on embedded
Supported on android

disable command

Disables all breakpoints or specified breakpoints.

Syntax

disable
disable [Number]
disable [Number1] [Number2] ... [NumberN]
disable breakpoints ...

Parameters

Number
When the disable is invoked without any arguments, it disables all breakpoints. When one or more numbers are specified, only the breakpoints matching the specified numbers will be disabled.

Remarks

Use the enable command to enable breakpoints, delete command to delete them, or the info breakpoints command to display information about breakpoints.

Examples

In this command we will set a breakpoint inside a loop and then disable it once it hits.

(gdb) break 6
Breakpoint 1 at 0x80483f7: file test.cpp, line 6.
(gdb) run
Starting program: /home/testuser/test
Breakpoint 1, main () at test.cpp:6
6 printf("%di);
(gdb) disable 1
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep n 0x080483f7 in main() at test.cpp:6
breakpoint already hit 1 time
(gdb) continue
Continuing.
0
1
2
3
4
[Inferior 1 (process 26540) exited normally]

Compatibility with VisualGDB

Normally you do not need to run the disable command under VisualGDB. Please use the Breakpoints window in Visual Studio to view and manage your breakpoints.

See also