Python Debugger
Graphical Debugger for Sublime Text
Details
Installs
- Total 57K
- Win 34K
- Mac 9K
- Linux 13K
Mar 31 | Mar 30 | 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 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 4 | 1 | 3 | 6 | 4 | 5 | 8 | 1 | 3 | 0 | 0 | 5 | 6 | 5 | 5 | 4 | 4 | 1 | 3 | 6 | 2 | 5 | 4 | 3 | 5 | 3 | 2 | 3 | 3 | 6 | 5 | 5 | 5 | 2 | 3 | 1 | 3 | 4 | 3 | 3 | 3 | 4 | 5 | 7 | 5 | 7 |
Mac | 0 | 1 | 0 | 0 | 0 | 0 | 3 | 5 | 2 | 0 | 2 | 1 | 3 | 0 | 0 | 3 | 1 | 1 | 0 | 2 | 1 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 2 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 |
Linux | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 3 | 1 | 3 | 0 | 2 | 1 | 1 | 1 | 1 | 0 | 1 | 2 | 1 | 0 | 4 | 3 | 1 | 0 | 1 | 1 | 6 | 0 | 3 | 0 | 2 | 1 | 0 | 2 | 1 | 0 | 6 | 1 | 1 | 2 | 2 | 0 |
Readme
- Source
- raw.githubusercontent.com
SublimeDebugger
This is a graphical debugger for Sublime Text 3.
Hire Me
The developer of this project needs a job. I can relocate anywhere in the world or work remotely. I have a degree in Mechanical Engineering. wvlia5@live.com.ar
Features
- Setting breakpoints, using either keyboard shortcuts or the console.
- Local and Global Variables Inspector
- Expression Watcher
- Breakpoints Editor
- Step, Continue, Next, Outer/Inner frame through the console
Languages Supported
- Python 2
- Python 3
How to add support to your favourite Language
You've got to write a backend for the debugger. They are located in the backends folder. Your backend should implement a class with the following members (Which will be called by the frontend):
- set_break(filename, line, bpinfo)
Is called by the frontend to set a breakpoint. bppinfo is a dict containing info about the breakpoint (backend dependant).
- clear_break(filename, line)
Is called by the frontend to clear a breakpoint.
- toggle_break(filename, line)
Is called by the frontend to toggle a breakpoint.
- tryeval(expr)
Is called by the frontend to evaluate an expression. It is needed to fill the Expression Watcher. Should return the result of the evaluated expression in the current context.
- runscript(filename)
Is called by the frontend to start debugging a program.
- breakpoints
A dict of breakpoints. The structure of the dict is the following:
{
filename1:
{
line1: bpinfo1,
line2: bpinfo2,
line3: bpinfo3,
etc..
},
filename2:
etc..
}
where each bpinfo is a dict with backend dependant content.
- parent
An member that will be set by the frontend, it will have the methods mentioned next.
Additionally, the following methods of the frontend should be called by your backend when relevant (accessed through the parent member of your backend):
- get_cmd(line, locals, globals, filename)
Request a command from the user.
- set_break(filename, line, bpinfo)
Set a breakpoint in the Sublime GUI
- clear_break(filename,line)
Clear a breakpoint of the Sublime GUI
- toggle_break(filename,line)
Toggle a breakpoint in the Sublime GUI
- show_help(help_str)
Show the help message help_str in Sublime
- show_exception(message)
Show an exception message in Sublime
Then import the backend from mydebugger.py. Add your language to Main.sublime-menu and to languageCommand in mydebugger.py
The Python3 backend (dbPython3.py) is the simpler one, take a look at that for guidance. Also, contact me if you really mean to implement one, I'll help you so we can include it here afterwards. wvlia5@live.com.ar
TODO
- ST2 support?
- better exception handling (I think it can't be made better since it is managed by bdb)
- toggle hide special members
- configuring breakpoints from Breakpoints Watcher?
- multifile support
- test on windows
- context key bindings with filename?