Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Usage
To start your debug session, use the following variants::

Usage: Dbg - (no auto start)
Dbg . (autostart current file -- python)
Dbg . [args] (autostart current file -- python)
Dbg url (autostart a URL -- PHP)
Dbg num (autostart a past url -- PHP)

Expand Down
5 changes: 3 additions & 2 deletions vim_debug/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def decor(fn):

debugger = None

def start(url = None):
def start(url = None, *args):
global debugger
if debugger and debugger.started:
return
Expand Down Expand Up @@ -85,7 +85,8 @@ def start(url = None):
if not (os.path.exists(fname) and fname.endswith('.py')):
print 'Current file is not python (or doesn\'t exist on your hard drive)'
return
debugger.start_py(fname)
full_cmds = "{} {}".format(fname, " ".join(args))
debugger.start_py(full_cmds)
elif url == '-':
debugger.start()
else:
Expand Down
3 changes: 2 additions & 1 deletion vim_debug/new_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def start_py(self, fname):
PYDBGP = PYDBGP + '/../EGG-INFO/scripts/pydbgp.py'
subprocess.Popen(('python.exe',PYDBGP, '-d', 'localhost:9000', fname), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
subprocess.Popen(('pydbgp.py', '-d', 'localhost:9000', fname), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
with_args = ('pydbgp.py', '-d', 'localhost:9000') + tuple(fname.split())
subprocess.Popen(with_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

self._type = 'python'
return self.start()
Expand Down