# Debugger: Model Service

This service plugin backs the Targets window. It maintains all debugger connections across the entire Ghidra session, that is, they're shared across all tools.

## Actions

The plugin also provides some shortcut actions.

### Debug Program

This group of actions is available whenever there exists a debug launcher that knows how to run the current program. Various launchers may all make offers to run the current program, each of which is presented as a item in this group. Not all offers are guaranteed to work. For example, an offer to launch the program remotely via SSH depends on the host's availability, the user's credentials, and the presence of the target binary on the host. The offers are ordered by most recent activation. The most recent offer used is the default launcher for the current program. Each launcher may check various conditions before making an offer. Most commonly, it will check that there is a suitable debugger for the current program's architecture (language) on the local system, that the program's original executable image still exists on disk, and that the user has permission to execute it. A launcher may take any arbitrary action to run the program. Most commonly, it starts a new connection suitable for the target, and then launches the program on that connection. If Record Automatically is enabled, this will provide a single-click action to debug the current program. This is similar to the Quick Launch action in the Commands and Objects window, except this one does not require an existing connection.

The launch offers are presented in two places. First, they are listed as drop-down items from the "Debug Program" action in the main toolbar. When activated here, there are typically no further prompts. One notable exception is SSH, where authentication may be required. Second, they are listed under the Debugger → Debug Program menu. When activated here, the launcher should prompt for arguments. The chosen arguments are saved as the default for future launches of the current program.

### Disconnect All

This action is always available from the main application window. It closes all debugger connections, no matter what tool created them. This is a sort of panic and reset action. NOTE: A complete and total reset is not always possible. Some connectors may load native libraries into Ghidra's JVM. Unless that connector is careful to reset that library's state, subsequent connections could be affected.