ide-debug-manager: Builder SDK Reference

## ide-debug-manager ide-debug-manager |

## Functions

IdeDebugger * | ide_debug_manager_get_debugger ()
gboolean | ide_debug_manager_get_active ()
gboolean | ide_debug_manager_start ()
void | ide_debug_manager_stop ()
IdeDebuggerBreakpoints * | ide_debug_manager_get_breakpoints_for_file ()
gboolean | ide_debug_manager_supports_language ()
IdeDebugger * | ide_debug_manager_find_debugger ()

## Properties

gboolean | active | Read
IdeDebugger * | debugger | Read

## Signals

void | breakpoint-added | Run Last
void | breakpoint-reached | Run Last
void | breakpoint-removed | Run Last

## Types and Values

#define | IDE_TYPE_DEBUG_MANAGER
| IdeDebugManager

## Object Hierarchy

        GObject
        ╰── IdeObject
            ╰── IdeDebugManager

## Description

## Functions

### ide_debug_manager_get_debugger ()

    IdeDebugger *
    ide_debug_manager_get_debugger (IdeDebugManager *self);

Gets the debugger instance, if it is loaded.

#### Parameters

self | a IdeDebugManager |

#### Returns

An IdeDebugger or `NULL`.

[transfer none][nullable]

### ide_debug_manager_get_active ()

    gboolean
    ide_debug_manager_get_active (IdeDebugManager *self);

### ide_debug_manager_start ()

    gboolean
    ide_debug_manager_start (IdeDebugManager *self,
                             IdeRunner *runner,
                             GError **error);

Attempts to start a runner using a discovered debugger backend.

#### Parameters

self | an IdeDebugManager |
runner | an IdeRunner |
error | A location for an `error` |

#### Returns

`TRUE` if successful; otherwise `FALSE` and `error` is set.

### ide_debug_manager_stop ()

    void
    ide_debug_manager_stop (IdeDebugManager *self);

### ide_debug_manager_get_breakpoints_for_file ()

    IdeDebuggerBreakpoints *
    ide_debug_manager_get_breakpoints_for_file
                                   (IdeDebugManager *self,
                                    GFile *file);

This returns an IdeDebuggerBreakpoints that represents the breakpoints within a given file.

This inderect breakpoints container provides a very fast way to check if a line has a breakpoint set. You want to use this when performance really matters such as from the gutter of the source editor.

Breakpoints contained in the resulting structure will automatically propagate to the debugger when the debugger has been successfully spawned.

#### Returns

An IdeDebuggerBreakpoints.

[transfer full]

### ide_debug_manager_supports_language ()

    gboolean
    ide_debug_manager_supports_language (IdeDebugManager *self,
                                         const gchar *language_id);

This checks to see if there is a debugger that can possibly support a given language id. This is used to determine if space for breakpoints should be reserved in the gutter of source code editor.

This function accepts `NULL` for `language_id` out of convenience and will return `NULL` in this case.

#### Parameters

self | a IdeDebugManager |
language_id | GtkSourceView based language identifier or `NULL`. | [nullable]

#### Returns

`TRUE` if the language is supported; otherwise `FALSE`.

Since: 3.26

### ide_debug_manager_find_debugger ()

    IdeDebugger *
    ide_debug_manager_find_debugger (IdeDebugManager *self,
                                     IdeRunner *runner);

Locates a debugger for the given runner, or `NULL` if no debugger supports the runner.

#### Parameters

self | a IdeDebugManager |
runner | An IdeRunner |

#### Returns

An IdeDebugger or `NULL`.

[transfer full][nullable]

## Types and Values

### IDE_TYPE_DEBUG_MANAGER

    #define IDE_TYPE_DEBUG_MANAGER (ide_debug_manager_get_type())

### IdeDebugManager

    typedef struct _IdeDebugManager IdeDebugManager;

## Property Details

### The `“active”` property

      “active”                   gboolean

If the debugger is active.

This can be used to determine if the controls should be made visible in the workbench.

Flags: Read

Default value: FALSE

### The `“debugger”` property

      “debugger”                 IdeDebugger *

The current debugger being used.

Flags: Read

## Signal Details

### The `“breakpoint-added”` signal

    void
    user_function (IdeDebugManager       *self,
                   IdeDebuggerBreakpoint *breakpoint,
                   gpointer               user_data)

The "breakpoint-added" signal is emitted when a new breakpoint has been registered by the debugger.

#### Parameters

self | An IdeDebugManager |
breakpoint | an IdeDebuggerBreakpoint |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.26

### The `“breakpoint-reached”` signal

    void
    user_function (IdeDebugManager       *self,
                   IdeDebuggerBreakpoint *breakpoint,
                   gpointer               user_data)

The "breakpoint-reached" signal is emitted when the debugger has reached a breakpoint and execution has stopped.

If you need the stop reason, you should connect to “stopped” on the IdeDebugger itself.

See also: “debugger”

#### Parameters

self | An IdeDebugManager |
breakpoint | An IdeDebuggerBreakpoint |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.26

### The `“breakpoint-removed”` signal

    void
    user_function (IdeDebugManager       *self,
                   IdeDebuggerBreakpoint *breakpoint,
                   gpointer               user_data)

The "breakpoint-removed" signal is emitted when a new breakpoint has been removed by the debugger.

#### Parameters

self | An IdeDebugManager |
breakpoint | an IdeDebuggerBreakpoint |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.26