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

Debugger

by daveleroy ALL

Graphical Debugger for Sublime Text using the debug adapter protocol

Details

  • 0.4.0
    0.2.10
  • github.​com
  • github.​com
  • 3 weeks ago
  • 3 hours ago
  • 1 year ago

Installs

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

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

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-projec 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.
  • 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/3/build_systems.html

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

"debugger_tasks" : [
    {
        "name" : "Name of your configuration",
        "request" : "launch"|"attach",
        "type" : "debugger name",
         ...
    }
]
  • 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 specifiying 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)