Skip to content

Commit

Permalink
add host/port params to remote.set_trace()
Browse files Browse the repository at this point in the history
  • Loading branch information
arne-cl committed May 23, 2016
1 parent 25e87a1 commit ed75837
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pudb/remote.py
Expand Up @@ -131,17 +131,17 @@ def set_quit(self):
sys.settrace(None)


def debugger(term_size=None):
def debugger(term_size=None, host=PUDB_RDB_HOST, port=PUDB_RDB_PORT):
"""Return the current debugger instance (if any),
or creates a new one."""
rdb = _current[0]
if rdb is None or not rdb.active:
rdb = _current[0] = RemoteDebugger(term_size=term_size)
rdb = _current[0] = RemoteDebugger(host=host, port=port, term_size=term_size)
return rdb


def set_trace(frame=None, term_size=None):
def set_trace(frame=None, term_size=None, host=PUDB_RDB_HOST, port=PUDB_RDB_PORT):
"""Set breakpoint at current location, or a specified frame"""
if frame is None:
frame = _frame().f_back
return debugger(term_size=term_size).set_trace(frame)
return debugger(term_size=term_size, host=host, port=port).set_trace(frame)

0 comments on commit ed75837

Please sign in to comment.