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

Print​Debugger

Sublime Text plugin for easy insertion of print/debug statements

Details

Installs

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

Readme

Source
raw.​githubusercontent.​com

🤖 PrintDebugger

PrintDebugger is a fully customizable Sublime Text plugin that allows easy insertion of both debugging and empty print statements.

🎬 Demonstration

PrintDebugger: Print Debug:

PrintDebugger: Print Debug

PrintDebugger: Print Debug (Before and After):

PrintDebugger: Print Debug (Before and After)

💻 Installation

The easiest way to install PrintDebugger is through Package Control. After it is enabled inside Sublime Text, open the command palette and find Package Control: Install Package and press ENTER. Then, find PrintDebugger in the list. Press ENTER again, and this plugin is installed!

📈 Usage

The plugin includes the command print_debug, which can be run in the command palette as PrintDebugger: Print Debug. There is a variant of the command with argument before_and_after set to true: PrintDebugger: Print Debug (Before and After).

To print out a meaningful message containing the name and value of a variable:

  • Click on or select that variable
  • Run the PrintDebugger: Print Debug command

To view the values of a variable before and after a line:

  • Click on or select that variable
  • Run the PrintDebugger: Print Debug (Before and After) command

To insert an empty print statement at the cursor:

  • Run the PrintDebugger: Print Debug command

⚙ Customization

The PrintDebugger plugin is fully customizable.

🔧 Preferences

The syntax of several languages are included by default when the plugin is installed. The syntax of print/debug statements, scopes, and file extensions associated with each language can be customized. New syntax can also be added in settings.

To modify or add print/debug syntax, run the Preferences: PrintDebugger command in the command palette.

⌨ Keybindings

Keybindings can be created for the commands.

  • Run the Preferences: PrintDebugger Key Bindings command in the command palette.
  • Add your keybindings!

Below is an example of the keybinding file:

[
    {
        "keys": ["alt+d"],
        "command": "print_debug"
    },
    {
        "keys": ["alt+shift+d"],
        "command": "print_debug",
        "args": { "before_and_after": true }
    }
]