ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Debugger

by daveleroy ST4

Graphical Debugger for Sublime Text for debuggers that support the debug adapter protocol

Details

Installs

  • Total 17K
  • Win 9K
  • Mac 4K
  • Linux 5K
Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13
Windows 0 5 10 9 8 3 5 6 5 11 5 3 5 4 5 8 4 3 8 8 8 6 4 8 15 4 4 2 6 5 2 3 3 6 4 4 8 5 5 6 6 3 2 10 4 5
Mac 0 3 3 2 13 5 3 5 2 3 5 4 1 3 0 4 3 2 5 3 2 6 9 8 6 0 3 2 3 3 2 3 6 4 3 3 4 1 3 2 3 7 3 3 3 3
Linux 0 3 6 2 1 7 2 4 2 3 4 3 5 3 1 1 4 9 4 3 2 4 3 3 3 6 1 2 1 5 3 5 7 4 1 2 3 2 7 2 1 4 1 8 2 5

Readme

Source
raw.​githubusercontent.​com

Sublime Debugger

Graphical Debugger for sublime text for debuggers that support the debug adapter protocol.

See Debug Adapter Protocol

Image of GUI

Installing

Using package control run Package Control: Install Package and select Debugger.

or clone into your sublime Packages directory (If you are on Sublime Text 3 use the st3 branch)

Getting Started

This project attempts to match Visual Studio Code's Debugger fairly closely so their documentation can be pretty helpful. See https://code.visualstudio.com/docs/editor/debugging

Debuggers

This project comes with some pre-configured debuggers (They can be installed using Debugger: Install adapter)

LLDB
Chrome
Firefox
Node
Python
Go
PHP
Java
Emulicious Debugger

Setup

  • Open the debug panel

    • from the command palette Debugger: Open
  • Install a debug adapter by running: Debugger: Install adapter from the command palette.

  • Add a configuration Debugger: Add Configuration from the command palette (or add one manually, see below).

    • Configurations are added to debugger_configurations to your sublime-project and use the same configuration format as Visual Studio Code
    • Consult the debugger specific documentation links above for creating a configuration for your debugger. Most debuggers come with some configuration snippets to choose from but I highly recommend looking at the documentation for the debugger.
    • Variable substitution: variables like ${file} are supported but the list of supported variables differs from VSCode. The supported values are those listed at http://www.sublimetext.com/docs/build_systems.html#variables plus the VSCode-specific ${workspaceFolder} that resolves to the path of the first workspace folder.
  • Your configuration will look something like the following but with some debugger specific fields.

"debugger_configurations" : [
    {
        "name" : "Name of your configuration",
        "request" : "launch"|"attach",
        "type" : "debugger name",
         ...
    }
]
  • Start debugging
    • click the gear icon to select a configuration to use
    • click the play icon to start the debugger or run Debugger: Start (if no configuration is selected it will ask you to select or create one)

Tasks

Tasks are based on sublime build_systems with more integration so they can be used more seamlessly while debugging. When errors occur while running a task they are reported in the debugger ui (problem detection is the same as sublime, you must add file_regex to your task)

see https://www.sublimetext.com/docs/build_systems.html

Tasks are basically the same as sublime builds but there are a few additional parameters. name which will show up in the debugger UI and be the name of the panel

"debugger_tasks" : [
    {
        "name" : "Name of your task",
        "cmd" : ["task", "command"],
         ...
    }
]
  • Tasks can be run with Debugger: Run Tasks
  • You can run tasks before and after debugging by adding pre_debug_task or post_debug_task to your configuration specifying the name of the task to run.

Settings

Settings can either be set at the project level or globally. Project settings can be changed by appending debug. to the setting name.

Within a .sublime_settings file - "open_at_startup": true Open the debugger automatically when a project that is set up for debugging has been opened - "ui_scale": 12 scales the entire debugger UI

Within a .sublime_project file settings object - debug.open_at_startup - debug.ui_scale

for a full list of settings see debugger.sublime-settings

Troubleshooting

  • Look in the debug console for errors (usually red)
  • Look in the sublime console for errors
  • Try the same configuration/adapter in Visual Studio Code (There is a good chance your issue is with the adapter so check out the outstanding issues for it)