IdeDebugger: Builder SDK Reference

## IdeDebugger IdeDebugger — Base class for debugger implementations |

## Functions

gboolean | ide_debugger_supports_runner ()
void | ide_debugger_prepare ()
GListModel * | ide_debugger_get_breakpoints ()
const gchar * | ide_debugger_get_display_name ()
void | ide_debugger_set_display_name ()
gboolean | ide_debugger_get_is_running ()
gboolean | ide_debugger_get_can_move ()
GListModel * | ide_debugger_get_threads ()
GListModel * | ide_debugger_get_thread_groups ()
IdeDebuggerThread * | ide_debugger_get_selected_thread ()
void | ide_debugger_disassemble_async ()
GPtrArray * | ide_debugger_disassemble_finish ()
void | ide_debugger_insert_breakpoint_async ()
gboolean | ide_debugger_insert_breakpoint_finish ()
void | ide_debugger_interrupt_async ()
gboolean | ide_debugger_interrupt_finish ()
void | ide_debugger_modify_breakpoint_async ()
gboolean | ide_debugger_modify_breakpoint_finish ()
void | ide_debugger_remove_breakpoint_async ()
gboolean | ide_debugger_remove_breakpoint_finish ()
void | ide_debugger_list_breakpoints_async ()
GPtrArray * | ide_debugger_list_breakpoints_finish ()
void | ide_debugger_list_frames_async ()
GPtrArray * | ide_debugger_list_frames_finish ()
void | ide_debugger_list_locals_async ()
GPtrArray * | ide_debugger_list_locals_finish ()
void | ide_debugger_list_params_async ()
GPtrArray * | ide_debugger_list_params_finish ()
void | ide_debugger_list_registers_async ()
GPtrArray * | ide_debugger_list_registers_finish ()
void | ide_debugger_move_async ()
gboolean | ide_debugger_move_finish ()
void | ide_debugger_send_signal_async ()
gboolean | ide_debugger_send_signal_finish ()
const gchar * | ide_debugger_locate_binary_at_address ()
void | ide_debugger_emit_log ()
void | ide_debugger_emit_thread_group_added ()
void | ide_debugger_emit_thread_group_removed ()
void | ide_debugger_emit_thread_group_started ()
void | ide_debugger_emit_thread_group_exited ()
void | ide_debugger_emit_thread_added ()
void | ide_debugger_emit_thread_removed ()
void | ide_debugger_emit_thread_selected ()
void | ide_debugger_emit_breakpoint_added ()
void | ide_debugger_emit_breakpoint_modified ()
void | ide_debugger_emit_breakpoint_removed ()
void | ide_debugger_emit_running ()
void | ide_debugger_emit_stopped ()
void | ide_debugger_emit_library_loaded ()
void | ide_debugger_emit_library_unloaded ()

## Properties

gchar * | display-name | Read / Write
IdeDebuggerThread * | selected-thread | Read

## Signals

void | breakpoint-added | Run Last
void | breakpoint-modified | Run Last
void | breakpoint-removed | Run Last
void | library-loaded | Run Last
void | library-unloaded | Run Last
void | log | Run Last
void | running | Run Last
void | stopped | Run Last
void | thread-added | Run Last
void | thread-group-added | Run Last
void | thread-group-exited | Run Last
void | thread-group-removed | Run Last
void | thread-group-started | Run Last
void | thread-removed | Run Last
void | thread-selected | Run Last

## Types and Values

#define | IDE_TYPE_DEBUGGER
struct | IdeDebuggerClass
| IdeDebugger

## Object Hierarchy

        GObject
        ╰── IdeObject
            ╰── IdeDebugger

## Implemented Interfaces

IdeDebugger implements GActionGroup.

## Description

The IdeDebugger abstract base class is used by debugger implementations. They should bridge their backend-specific features into those supported by the API using the series of "emit" functions provided as part of this class.

For example, when the inferior creates a new thread, the debugger implementation should call `ide_debugger_emit_thread_added()`.

## Functions

### ide_debugger_supports_runner ()

    gboolean
    ide_debugger_supports_runner (IdeDebugger *self,
                                  IdeRunner *runner,
                                  gint *priority);

Checks if the debugger supports a given runner. The debugger may need to check if the binary type matches it's expectation.

#### Parameters

self | an IdeDebugger |
runner | an IdeRunner |
priority | A location for a priority. | [out]

#### Returns

`TRUE` if the IdeDebugger supports the runner.

Since: 3.32

### ide_debugger_prepare ()

    void
    ide_debugger_prepare (IdeDebugger *self,
                          IdeRunner *runner);

Prepares the runner to launch a debugger and target process.

#### Parameters

self | an IdeDebugger |
runner | an IdeRunner |

Since: 3.32

### ide_debugger_get_breakpoints ()

    GListModel *
    ide_debugger_get_breakpoints (IdeDebugger *self);

Gets the breakpoints for the IdeDebugger.

Contrast this to `ide_debugger_list_breakpoints_async()` which will query the debugger backend for breakpoints. This GListModel containing IdeDebuggerBreakpoint instances is updated as necessary by listening to various breakpoint related signals on the IdeDebugger instance.

This is primarily out of convenience to be used by UI which wants to display information on breakpoints.

#### Parameters

self | An IdeDebugger |

#### Returns

a GListModel of IdeDebuggerBreakpoint.

[transfer none][not nullable]

Since: 3.32

### ide_debugger_get_display_name ()

    const gchar *
    ide_debugger_get_display_name (IdeDebugger *self);

Gets the display name for the debugger as the user should see it in various UI components.

#### Parameters

self | a IdeDebugger |

#### Returns

The display name for the debugger

Since: 3.32

### ide_debugger_set_display_name ()

    void
    ide_debugger_set_display_name (IdeDebugger *self,
                                   const gchar *display_name);

Sets the “display-name” property.

#### Parameters

self | a IdeDebugger |

Since: 3.32

### ide_debugger_get_is_running ()

    gboolean
    ide_debugger_get_is_running (IdeDebugger *self);

### ide_debugger_get_can_move ()

    gboolean
    ide_debugger_get_can_move (IdeDebugger *self,
                               IdeDebuggerMovement movement);

Checks to see if the debugger can make the movement matching `movement` .

#### Parameters

self | a IdeDebugger |
movement | the movement to check |

#### Returns

`TRUE` if `movement` can be performed.

Since: 3.32

### ide_debugger_get_threads ()

    GListModel *
    ide_debugger_get_threads (IdeDebugger *self);

Gets the threads that have been registered by the debugger.

The resulting GListModel accuracy is based on the IdeDebugger implementation emitting varous thread modification signals correctly.

#### Parameters

self | a IdeDebugger |

#### Returns

a GListModel of IdeDebuggerThread.

[transfer none][not nullable]

Since: 3.32

### ide_debugger_get_thread_groups ()

    GListModel *
    ide_debugger_get_thread_groups (IdeDebugger *self);

Gets the thread groups that have been registered by the debugger.

The resulting GListModel accuracy is based on the IdeDebugger implementation emitting varous thread-group modification signals correctly.

#### Parameters

self | a IdeDebugger |

#### Returns

a GListModel of IdeDebuggerThreadGroup.

[transfer none][not nullable]

Since: 3.32

### ide_debugger_get_selected_thread ()

    IdeDebuggerThread *
    ide_debugger_get_selected_thread (IdeDebugger *self);

Gets the current selected thread by the debugger.

#### Parameters

self | An IdeDebugger |

#### Returns

An IdeDebuggerThread or `NULL`.

[transfer none][nullable]

Since: 3.32

### ide_debugger_disassemble_async ()

    void
    ide_debugger_disassemble_async (IdeDebugger *self,
                                    const IdeDebuggerAddressRange *range,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Disassembles the address range requested.

#### Parameters

self | an IdeDebugger |
range | an IdeDebuggerAddressRange to disassemble |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | A callback to call once the operation has finished |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_disassemble_finish ()

    GPtrArray *
    ide_debugger_disassemble_finish (IdeDebugger *self,
                                     GAsyncResult *result,
                                     GError **error);

Completes an asynchronous request to `ide_debugger_disassemble_async()`.

#### Parameters

self | a IdeDebugger |
result | a GAsyncResult |
error | a location for a GError or `NULL` |

#### Returns

a GPtrArray of IdeDebuggerInstruction if successful; otherwise `NULL` and error is set.

[transfer full][element-type Ide.DebuggerInstruction]

Since: 3.32

### ide_debugger_insert_breakpoint_async ()

    void
    ide_debugger_insert_breakpoint_async (IdeDebugger *self,
                                          IdeDebuggerBreakpoint *breakpoint,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Asynchronously requests that a breakpoint is added to the debugger.

This asynchronous function may complete before the breakpoint has been registered in the debugger. Debugger implementations will emit “breakpoint-added” when a breakpoint has been registered.

#### Parameters

self | An IdeDebugger |
breakpoint | An IdeDebuggerBreakpoint |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | an async callback to complete the operation |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_insert_breakpoint_finish ()

    gboolean
    ide_debugger_insert_breakpoint_finish (IdeDebugger *self,
                                           GAsyncResult *result,
                                           GError **error);

Completes a request to asynchronously insert a breakpoint.

See also: `ide_debugger_insert_breakpoint_async()`

#### Parameters

self | An IdeDebugger |
result | a GAsyncResult or `NULL` |
error | a GError, or `NULL` |

#### Returns

`TRUE` if the command was submitted successfully; otherwise `FALSE` and `error` is set.

Since: 3.32

### ide_debugger_interrupt_async ()

    void
    ide_debugger_interrupt_async (IdeDebugger *self,
                                  IdeDebuggerThreadGroup *thread_group,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronously requests that the debugger interrupts execution of a thread group. Thread groups are a collection of threads that are executed or stopped together and on gdb on Linux, this is the default for all threads in the process.

#### Parameters

self | a IdeDebugger |
thread_group | An IdeDebuggerThreadGroup. | [nullable]
cancellable | a GCancellable or `NULL`. | [nullable]
callback | a callback to execute upon completion. | [closure user_data]
user_data | closure data for `callback` |

Since: 3.32

### ide_debugger_interrupt_finish ()

    gboolean
    ide_debugger_interrupt_finish (IdeDebugger *self,
                                   GAsyncResult *result,
                                   GError **error);

### ide_debugger_modify_breakpoint_async ()

    void
    ide_debugger_modify_breakpoint_async (IdeDebugger *self,
                                          IdeDebuggerBreakpointChange change,
                                          IdeDebuggerBreakpoint *breakpoint,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Asynchronously requests that a breakpoint is modified by the debugger backend.

Specify `change` for how to modify the breakpoint.

This asynchronous function may complete before the breakpoint has been modified by the debugger. Debugger implementations will emit “breakpoint-modified” when a breakpoint has been removed.

#### Parameters

self | An IdeDebugger |
change | An IdeDebuggerBreakpointChange |
breakpoint | An IdeDebuggerBreakpoint |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | an async callback to complete the operation |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_modify_breakpoint_finish ()

    gboolean
    ide_debugger_modify_breakpoint_finish (IdeDebugger *self,
                                           GAsyncResult *result,
                                           GError **error);

Completes an asynchronous request to modify a breakpoint.

Note that this only completes the submission of the request, if you need to know when the breakpoint has been modified, listen to the “breakpoint-modified” signal.

#### Parameters

self | a IdeDebugger |
result | a GAsyncResult |
error | a location for a GError or `NULL` |

#### Returns

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

Since: 3.32

### ide_debugger_remove_breakpoint_async ()

    void
    ide_debugger_remove_breakpoint_async (IdeDebugger *self,
                                          IdeDebuggerBreakpoint *breakpoint,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

Asynchronously requests that a breakpoint is removed from the debugger.

This asynchronous function may complete before the breakpoint has been removed by the debugger. Debugger implementations will emit “breakpoint-removed” when a breakpoint has been removed.

#### Parameters

self | An IdeDebugger |
breakpoint | An IdeDebuggerBreakpoint |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | an async callback to complete the operation |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_remove_breakpoint_finish ()

    gboolean
    ide_debugger_remove_breakpoint_finish (IdeDebugger *self,
                                           GAsyncResult *result,
                                           GError **error);

Completes a request to asynchronously remove a breakpoint.

See also: `ide_debugger_remove_breakpoint_async()`

#### Parameters

self | An IdeDebugger |
result | a GAsyncResult or `NULL` |
error | a GError, or `NULL` |

#### Returns

`TRUE` if the command was submitted successfully; otherwise `FALSE` and `error` is set.

Since: 3.32

### ide_debugger_list_breakpoints_async ()

    void
    ide_debugger_list_breakpoints_async (IdeDebugger *self,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Asynchronously requests the list of current breakpoints from the debugger.

IdeDebugger implementations must implement the virtual function for this method.

#### Parameters

self | An IdeDebugger |
cancellable | a GCancellable, or `NULL`. | [nullable]
callback | a callback to call upon completion |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_list_breakpoints_finish ()

    GPtrArray *
    ide_debugger_list_breakpoints_finish (IdeDebugger *self,
                                          GAsyncResult *result,
                                          GError **error);

Gets the list of breakpoints from the debugger.

#### Parameters

self | An IdeDebugger |
result | a GAsyncResult provided to the async callback |
error | a location for a GError or `NULL` |

#### Returns

a GPtrArray of breakpoints that are registered with the debugger.

[transfer full][element-type Ide.DebuggerBreakpoint]

Since: 3.32

### ide_debugger_list_frames_async ()

    void
    ide_debugger_list_frames_async (IdeDebugger *self,
                                    IdeDebuggerThread *thread,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

### ide_debugger_list_frames_finish ()

    GPtrArray *
    ide_debugger_list_frames_finish (IdeDebugger *self,
                                     GAsyncResult *result,
                                     GError **error);

#### Returns

An array of debugger frames or `NULL` and `error` is set.

[transfer full][element-type Ide.DebuggerFrame][nullable]

Since: 3.32

### ide_debugger_list_locals_async ()

    void
    ide_debugger_list_locals_async (IdeDebugger *self,
                                    IdeDebuggerThread *thread,
                                    IdeDebuggerFrame *frame,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Requests the debugger backend to list the locals that are available to the given `frame` of `thread` .

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |
frame | an IdeDebuggerFrame |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | A callback to call once the operation has finished |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_list_locals_finish ()

    GPtrArray *
    ide_debugger_list_locals_finish (IdeDebugger *self,
                                     GAsyncResult *result,
                                     GError **error);

Completes an asynchronous request to `ide_debugger_list_locals_async()`.

#### Parameters

self | a IdeDebugger |
result | a GAsyncResult |
error | a location for a GError or `NULL` |

#### Returns

a GPtrArray of IdeDebuggerVariable if successful; otherwise `NULL` and error is set.

[transfer full][element-type Ide.DebuggerVariable]

Since: 3.32

### ide_debugger_list_params_async ()

    void
    ide_debugger_list_params_async (IdeDebugger *self,
                                    IdeDebuggerThread *thread,
                                    IdeDebuggerFrame *frame,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Requests the debugger backend to list the parameters to the given stack frame.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |
frame | an IdeDebuggerFrame |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | A callback to call once the operation has finished |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_list_params_finish ()

    GPtrArray *
    ide_debugger_list_params_finish (IdeDebugger *self,
                                     GAsyncResult *result,
                                     GError **error);

Completes an asynchronous request to `ide_debugger_list_params_async()`.

#### Parameters

self | a IdeDebugger |
result | a GAsyncResult |
error | a location for a GError or `NULL` |

#### Returns

a GPtrArray of IdeDebuggerVariable if successful; otherwise `NULL` and error is set.

[transfer full][element-type Ide.DebuggerVariable]

Since: 3.32

### ide_debugger_list_registers_async ()

    void
    ide_debugger_list_registers_async (IdeDebugger *self,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Requests the list of registers and their values.

#### Parameters

self | an IdeDebugger |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | A callback to call once the operation has finished |
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_list_registers_finish ()

    GPtrArray *
    ide_debugger_list_registers_finish (IdeDebugger *self,
                                        GAsyncResult *result,
                                        GError **error);

Completes an asynchronous request to `ide_debugger_list_registers_async()`.

#### Parameters

self | a IdeDebugger |
result | a GAsyncResult |
error | a location for a GError or `NULL` |

#### Returns

a GPtrArray of IdeDebuggerRegister if successful; otherwise `NULL` and error is set.

[transfer full][element-type Ide.DebuggerRegister]

Since: 3.32

### ide_debugger_move_async ()

    void
    ide_debugger_move_async (IdeDebugger *self,
                             IdeDebuggerMovement movement,
                             GCancellable *cancellable,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

Advances the debugger to the next breakpoint or until the debugger stops. `movement` should describe the type of movement to perform.

#### Parameters

self | a IdeDebugger |
movement | An IdeDebuggerMovement |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | A callback to call upon completion of the operation. | [scope async][closure user_data]
user_data | user data for `callback` |

Since: 3.32

### ide_debugger_move_finish ()

    gboolean
    ide_debugger_move_finish (IdeDebugger *self,
                              GAsyncResult *result,
                              GError **error);

Notifies that the movement request has been submitted to the debugger.

Note that this does not indicate that the movement has completed successfully, only that the command has be submitted.

#### Parameters

self | a IdeDebugger |
result | a GAsyncResult provided to the callback |
error | A location for a GError, or `NULL` |

#### Returns

`TRUE` if successful, otherwise `FALSE`

Since: 3.32

### ide_debugger_send_signal_async ()

    void
    ide_debugger_send_signal_async (IdeDebugger *self,
                                    gint signum,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

### ide_debugger_send_signal_finish ()

    gboolean
    ide_debugger_send_signal_finish (IdeDebugger *self,
                                     GAsyncResult *result,
                                     GError **error);

### ide_debugger_locate_binary_at_address ()

    const gchar *
    ide_debugger_locate_binary_at_address (IdeDebugger *self,
                                           IdeDebuggerAddress address);

Attempts to locate the binary that contains a given address.

`address` should be an address within the inferiors process space.

This works by keeping track of libraries as they are loaded and unloaded and their associated file mappings.

Currently, the filename will match the name in the inferior mount namespace, but that may change based on future design changes.

#### Parameters

self | a IdeDebugger |
address | the address within the inferior process space |

#### Returns

the filename of the binary or `NULL`

Since: 3.32

### ide_debugger_emit_log ()

    void
    ide_debugger_emit_log (IdeDebugger *self,
                           IdeDebuggerStream stream,
                           GBytes *content);

Emits the "log" signal.

Debugger implementations should use this to notify any listeners that incoming log information has been recieved.

Use the IdeDebuggerStream to denote the particular stream.

#### Parameters

self | a IdeDebugger |

Since: 3.32

### ide_debugger_emit_thread_group_added ()

    void
    ide_debugger_emit_thread_group_added (IdeDebugger *self,
                                          IdeDebuggerThreadGroup *thread_group);

### ide_debugger_emit_thread_group_removed ()

    void
    ide_debugger_emit_thread_group_removed
                                   (IdeDebugger *self,
                                    IdeDebuggerThreadGroup *thread_group);

### ide_debugger_emit_thread_group_started ()

    void
    ide_debugger_emit_thread_group_started
                                   (IdeDebugger *self,
                                    IdeDebuggerThreadGroup *thread_group);

### ide_debugger_emit_thread_group_exited ()

    void
    ide_debugger_emit_thread_group_exited (IdeDebugger *self,
                                           IdeDebuggerThreadGroup *thread_group);

### ide_debugger_emit_thread_added ()

    void
    ide_debugger_emit_thread_added (IdeDebugger *self,
                                    IdeDebuggerThread *thread);

Emits the “thread-added” signal notifying that a new thread has been added to the inferior.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |

Since: 3.32

### ide_debugger_emit_thread_removed ()

    void
    ide_debugger_emit_thread_removed (IdeDebugger *self,
                                      IdeDebuggerThread *thread);

Emits the “thread-removed” signal notifying that a thread has been removed to the inferior.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |

Since: 3.32

### ide_debugger_emit_thread_selected ()

    void
    ide_debugger_emit_thread_selected (IdeDebugger *self,
                                       IdeDebuggerThread *thread);

Emits the “thread-selected” signal notifying that a thread has been set as the current debugging thread.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |

Since: 3.32

### ide_debugger_emit_breakpoint_added ()

    void
    ide_debugger_emit_breakpoint_added (IdeDebugger *self,
                                        IdeDebuggerBreakpoint *breakpoint);

Emits the “breakpoint-added” signal.

Debugger implementations should call this when a new breakpoint has been registered with the debugger.

If a breakpoint has changed, you should use `ide_debugger_emit_breakpoint_modified()` to notify of the modification.

#### Parameters

self | an IdeDebugger |
breakpoint | an IdeDebuggerBreakpoint |

Since: 3.32

### ide_debugger_emit_breakpoint_modified ()

    void
    ide_debugger_emit_breakpoint_modified (IdeDebugger *self,
                                           IdeDebuggerBreakpoint *breakpoint);

Emits the “breakpoint-modified” signal.

Debugger implementations should call this when a breakpoint has changed in the underlying debugger.

#### Parameters

self | an IdeDebugger |
breakpoint | an IdeDebuggerBreakpoint |

Since: 3.32

### ide_debugger_emit_breakpoint_removed ()

    void
    ide_debugger_emit_breakpoint_removed (IdeDebugger *self,
                                          IdeDebuggerBreakpoint *breakpoint);

Emits the “breakpoint-removed” signal.

Debugger implementations should call this when a breakpoint has been removed either manually or automatically by the debugger.

If a breakpoint has changed, you should use `ide_debugger_emit_breakpoint_modified()` to notify of the modification.

#### Parameters

self | an IdeDebugger |
breakpoint | an IdeDebuggerBreakpoint |

Since: 3.32

### ide_debugger_emit_running ()

    void
    ide_debugger_emit_running (IdeDebugger *self);

Emits the "running" signal.

Debugger implementations should call this when the debugger has started or restarted executing the inferior.

#### Parameters

self | an IdeDebugger |

Since: 3.32

### ide_debugger_emit_stopped ()

    void
    ide_debugger_emit_stopped (IdeDebugger *self,
                               IdeDebuggerStopReason stop_reason,
                               IdeDebuggerBreakpoint *breakpoint);

Emits the "stopped" signal.

Debugger implementations should call this when the debugger has stopped and include the reason and location of the stop.

#### Parameters

self | an IdeDebugger |
stop_reason | the reason the debugger stopped |
breakpoint | the breakpoint representing the stop location |

Since: 3.32

### ide_debugger_emit_library_loaded ()

    void
    ide_debugger_emit_library_loaded (IdeDebugger *self,
                                      IdeDebuggerLibrary *library);

Emits the "library-loaded" signal.

Debugger implementations should call this when the debugger has loaded a new library.

#### Parameters

self | an IdeDebugger |
library | an IdeDebuggerLibrary |

Since: 3.32

### ide_debugger_emit_library_unloaded ()

    void
    ide_debugger_emit_library_unloaded (IdeDebugger *self,
                                        IdeDebuggerLibrary *library);

Emits the "library-unloaded" signal.

Debugger implementations should call this when the debugger has unloaded a library.

#### Parameters

self | an IdeDebugger |
library | an IdeDebuggerLibrary |

Since: 3.32

## Types and Values

### IDE_TYPE_DEBUGGER

    #define IDE_TYPE_DEBUGGER (ide_debugger_get_type())

### struct IdeDebuggerClass

    struct IdeDebuggerClass {
      IdeObjectClass parent_class;

      /* Signals */

      void       (*log)                      (IdeDebugger                  *self,
                                              IdeDebuggerStream             stream,
                                              GBytes                       *content);
      void       (*thread_group_added)       (IdeDebugger                  *self,
                                              IdeDebuggerThreadGroup       *thread_group);
      void       (*thread_group_removed)     (IdeDebugger                  *self,
                                              IdeDebuggerThreadGroup       *thread_group);
      void       (*thread_group_started)     (IdeDebugger                  *self,
                                              IdeDebuggerThreadGroup       *thread_group);
      void       (*thread_group_exited)      (IdeDebugger                  *self,
                                              IdeDebuggerThreadGroup       *thread_group);
      void       (*thread_added)             (IdeDebugger                  *self,
                                              IdeDebuggerThread            *thread);
      void       (*thread_removed)           (IdeDebugger                  *self,
                                              IdeDebuggerThread            *thread);
      void       (*thread_selected)          (IdeDebugger                  *self,
                                              IdeDebuggerThread            *thread);
      void       (*breakpoint_added)         (IdeDebugger                  *self,
                                              IdeDebuggerBreakpoint        *breakpoint);
      void       (*breakpoint_removed)       (IdeDebugger                  *self,
                                              IdeDebuggerBreakpoint        *breakpoint);
      void       (*breakpoint_modified)      (IdeDebugger                  *self,
                                              IdeDebuggerBreakpoint        *breakpoint);
      void       (*running)                  (IdeDebugger                  *self);
      void       (*stopped)                  (IdeDebugger                  *self,
                                              IdeDebuggerStopReason         stop_reason,
                                              IdeDebuggerBreakpoint        *breakpoint);
      void       (*library_loaded)           (IdeDebugger                  *self,
                                              IdeDebuggerLibrary           *library);
      void       (*library_unloaded)         (IdeDebugger                  *self,
                                              IdeDebuggerLibrary           *library);

      /* Virtual Functions */

      gboolean   (*supports_runner)          (IdeDebugger                  *self,
                                              IdeRunner                    *runner,
                                              gint                         *priority);
      void       (*prepare)                  (IdeDebugger                  *self,
                                              IdeRunner                    *runner);
      gboolean   (*get_can_move)             (IdeDebugger                  *self,
                                              IdeDebuggerMovement           movement);
      void       (*move_async)               (IdeDebugger                  *self,
                                              IdeDebuggerMovement           movement,
                                              GCancellable                 *cancellable,
                                              GAsyncReadyCallback           callback,
                                              gpointer                      user_data);
      gboolean   (*move_finish)              (IdeDebugger                  *self,
                                              GAsyncResult                 *result,
                                              GError                      **error);
      void       (*list_breakpoints_async)   (IdeDebugger                  *self,
                                              GCancellable                 *cancellable,
                                              GAsyncReadyCallback           callback,
                                              gpointer                      user_data);
      GPtrArray *(*list_breakpoints_finish)  (IdeDebugger                  *self,
                                              GAsyncResult                 *result,
                                              GError                      **error);
      void       (*insert_breakpoint_async)  (IdeDebugger                  *self,
                                              IdeDebuggerBreakpoint        *breakpoint,
                                              GCancellable                 *cancellable,
                                              GAsyncReadyCallback           callback,
                                              gpointer                      user_data);
      gboolean   (*insert_breakpoint_finish) (IdeDebugger                  *self,
                                              GAsyncResult                 *result,
                                              GError                      **error);
      void       (*remove_breakpoint_async)  (IdeDebugger                  *self,
                                              IdeDebuggerBreakpoint        *breakpoint,
                                              GCancellable                 *cancellable,
                                              GAsyncReadyCallback           callback,
                                              gpointer                      user_data);
      gboolean   (*remove_breakpoint_finish) (IdeDebugger                  *self,
                                              GAsyncResult                 *result,
                                              GError                      **error);
      void       (*modify_breakpoint_async)  (IdeDebugger                  *self,
                                              IdeDebuggerBreakpointChange   change,
                                              IdeDebuggerBreakpoint        *breakpoint,
                                              GCancellable                 *cancellable,
                                              GAsyncReadyCallback           callback,
                                              gpointer                      user_data);
      gboolean   (*modify_breakpoint_finish) (IdeDebugger                  *self,
                                              GAsyncResult                 *result,
                                              GError                        **error);
      void       (*list_frames_async)        (IdeDebugger                    *self,
                                              IdeDebuggerThread              *thread,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      GPtrArray *(*list_frames_finish)       (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
      void       (*interrupt_async)          (IdeDebugger                    *self,
                                              IdeDebuggerThreadGroup         *thread_group,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      gboolean   (*interrupt_finish)         (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
      void       (*send_signal_async)        (IdeDebugger                    *self,
                                              gint                            signum,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      gboolean   (*send_signal_finish)       (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
      void       (*list_locals_async)        (IdeDebugger                    *self,
                                              IdeDebuggerThread              *thread,
                                              IdeDebuggerFrame               *frame,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      GPtrArray *(*list_locals_finish)       (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
      void       (*list_params_async)        (IdeDebugger                    *self,
                                              IdeDebuggerThread              *thread,
                                              IdeDebuggerFrame               *frame,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      GPtrArray *(*list_params_finish)       (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
      void       (*list_registers_async)     (IdeDebugger                    *self,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      GPtrArray *(*list_registers_finish)    (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
      void       (*disassemble_async)        (IdeDebugger                    *self,
                                              const IdeDebuggerAddressRange  *range,
                                              GCancellable                   *cancellable,
                                              GAsyncReadyCallback             callback,
                                              gpointer                        user_data);
      GPtrArray *(*disassemble_finish)       (IdeDebugger                    *self,
                                              GAsyncResult                   *result,
                                              GError                        **error);
    };

### IdeDebugger

    typedef struct _IdeDebugger IdeDebugger;

## Property Details

### The `“display-name”` property

      “display-name”             gchar *

The "display-name" property is used by UI to when it is necessary to display the name of the debugger. You might set this to "GNU Debugger" or "Python Debugger", etc.

Owner: IdeDebugger

Flags: Read / Write

Default value: NULL

Since: 3.32

### The `“selected-thread”` property

      “selected-thread”          IdeDebuggerThread *

The currently selected thread.

Owner: IdeDebugger

Flags: Read

Since: 3.32

## Signal Details

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

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

The "breakpoint-added" signal is emitted when a breakpoint has been added to the debugger.

#### Parameters

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

Flags: Run Last

Since: 3.32

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

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

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

#### Parameters

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

Flags: Run Last

Since: 3.32

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

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

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

#### Parameters

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

Flags: Run Last

Since: 3.32

### The `“library-loaded”` signal

    void
    user_function (IdeDebugger        *self,
                   IdeDebuggerLibrary *library,
                   gpointer            user_data)

This signal is emitted when a library has been loaded by the debugger.

#### Parameters

self | An IdeDebugger |
library | An IdeDebuggerLibrary |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“library-unloaded”` signal

    void
    user_function (IdeDebugger        *self,
                   IdeDebuggerLibrary *library,
                   gpointer            user_data)

This signal is emitted when a library has been unloaded by the debugger. Generally, this means that the library was a module and loaded in such a way that allowed unloading.

#### Parameters

self | An IdeDebugger |
library | An IdeDebuggerLibrary |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“log”` signal

    void
    user_function (IdeDebugger      *self,
                   IdeDebuggerStream stream,
                   GBytes           *content,
                   gpointer          user_data)

The "log" signal is emitted when there is new content to be appended to one of the streams.

#### Parameters

self | An IdeDebugger. |
stream | the stream to append to. |
content | the contents for the stream. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“running”` signal

    void
    user_function (IdeDebugger *self,
                   gpointer     user_data)

This signal is emitted when the debugger starts or resumes executing the inferior.

#### Parameters

self | a IdeDebugger |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“stopped”` signal

    void
    user_function (IdeDebugger           *self,
                   IdeDebuggerStopReason  stop_reason,
                   IdeDebuggerBreakpoint *breakpoint,
                   gpointer               user_data)

This signal is emitted when the debugger has stopped executing the inferior for a variety of reasons.

If possible, the debugger implementation will provide the breakpoint of the location the debugger stopped. That location may not always be representable by source in the project (such as memory address based breakpoints).

#### Parameters

self | a IdeDebugger |
stop_reason | An IdeDebuggerStopReason |
breakpoint | An IdeDebuggerBreakpoint if any. | [nullable]
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

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

    void
    user_function (IdeDebugger       *self,
                   IdeDebuggerThread *thread,
                   gpointer           user_data)

The signal is emitted when a thread is added to the inferior.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“thread-group-added”` signal

    void
    user_function (IdeDebugger            *self,
                   IdeDebuggerThreadGroup *thread_group,
                   gpointer                user_data)

This signal is emitted when a thread-group has been added.

#### Parameters

self | an IdeDebugger |
thread_group | an IdeDebuggerThreadGroup |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“thread-group-exited”` signal

    void
    user_function (IdeDebugger            *self,
                   IdeDebuggerThreadGroup *thread_group,
                   gpointer                user_data)

This signal is emitted when a thread-group has exited.

#### Parameters

self | an IdeDebugger |
thread_group | an IdeDebuggerThreadGroup |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“thread-group-removed”` signal

    void
    user_function (IdeDebugger            *self,
                   IdeDebuggerThreadGroup *thread_group,
                   gpointer                user_data)

This signal is emitted when a thread-group has been removed.

#### Parameters

self | an IdeDebugger |
thread_group | an IdeDebuggerThreadGroup |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“thread-group-started”` signal

    void
    user_function (IdeDebugger            *self,
                   IdeDebuggerThreadGroup *thread_group,
                   gpointer                user_data)

This signal is emitted when a thread-group has been started.

#### Parameters

self | an IdeDebugger |
thread_group | an IdeDebuggerThreadGroup |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

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

    void
    user_function (IdeDebugger       *self,
                   IdeDebuggerThread *thread,
                   gpointer           user_data)

The signal is emitted when a thread is removed from the inferior.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32

### The `“thread-selected”` signal

    void
    user_function (IdeDebugger       *self,
                   IdeDebuggerThread *thread,
                   gpointer           user_data)

The signal is emitted when a thread is selected in the debugger.

#### Parameters

self | an IdeDebugger |
thread | an IdeDebuggerThread |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 3.32