- show list of breakpoints as a dropdown command
- show current breakpoints in the gutter
- find a way to synchronize breakpoints across machines
- 
      
- 
        Save chriswl/5876844 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [ | |
| { | |
| "caption": "Breakpoint helper for pudb", | |
| "command": "add_breakpoint" | |
| } | |
| ] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/python | |
| import sublime | |
| import sublime_plugin | |
| from os.path import exists | |
| from os.path import expanduser | |
| home = expanduser("~") | |
| PUDB_FILE = home + '/.config/pudb/saved-breakpoints' | |
| class AddBreakpointCommand (sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| filename = self.view.file_name() | |
| if filename and exists(PUDB_FILE): | |
| with open(PUDB_FILE, 'a') as f: | |
| for selection in self.view.sel(): | |
| row, _ = self.view.rowcol(selection.begin()) | |
| breakpoint = "b %s:%d\n" % (filename, row + 1) | |
| f.write(breakpoint) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment