|
| 1 | +diff --git _pydevd_bundle/pydevd_command_line_handling.py _pydevd_bundle/pydevd_command_line_handling.py |
| 2 | +index 2afae09..2985a35 100644 |
| 3 | +--- _pydevd_bundle/pydevd_command_line_handling.py |
| 4 | ++++ _pydevd_bundle/pydevd_command_line_handling.py |
| 5 | +@@ -69,6 +69,7 @@ ACCEPTED_ARG_HANDLERS = [ |
| 6 | + ArgHandlerWithParam('client-access-token'), |
| 7 | + |
| 8 | + ArgHandlerBool('server'), |
| 9 | ++ ArgHandlerBool('continue'), |
| 10 | + ArgHandlerBool('DEBUG_RECORD_SOCKET_READS'), |
| 11 | + ArgHandlerBool('multiproc'), # Used by PyCharm (reuses connection: ssh tunneling) |
| 12 | + ArgHandlerBool('multiprocess'), # Used by PyDev (creates new connection to ide) |
| 13 | +diff --git pydevd.py pydevd.py |
| 14 | +index 4639778..9ecfec0 100644 |
| 15 | +--- pydevd.py |
| 16 | ++++ pydevd.py |
| 17 | +@@ -1376,6 +1376,8 @@ class PyDB(object): |
| 18 | + |
| 19 | + def run(self): |
| 20 | + host = SetupHolder.setup['client'] |
| 21 | ++ if host is None: |
| 22 | ++ host = '' |
| 23 | + port = SetupHolder.setup['port'] |
| 24 | + |
| 25 | + self._server_socket = create_server_socket(host=host, port=port) |
| 26 | +@@ -2240,7 +2242,7 @@ class PyDB(object): |
| 27 | + from _pydev_bundle.pydev_monkey import patch_thread_modules |
| 28 | + patch_thread_modules() |
| 29 | + |
| 30 | +- def run(self, file, globals=None, locals=None, is_module=False, set_trace=True): |
| 31 | ++ def run(self, file, globals=None, locals=None, is_module=False, set_trace=True, wait=True): |
| 32 | + module_name = None |
| 33 | + entry_point_fn = '' |
| 34 | + if is_module: |
| 35 | +@@ -2322,7 +2324,8 @@ class PyDB(object): |
| 36 | + sys.path.insert(0, os.path.split(os_path_abspath(file))[0]) |
| 37 | + |
| 38 | + if set_trace: |
| 39 | +- self.wait_for_ready_to_run() |
| 40 | ++ if wait: |
| 41 | ++ self.wait_for_ready_to_run() |
| 42 | + |
| 43 | + # call prepare_to_run when we already have all information about breakpoints |
| 44 | + self.prepare_to_run() |
| 45 | +@@ -3276,14 +3279,21 @@ def main(): |
| 46 | + |
| 47 | + apply_debugger_options(setup) |
| 48 | + |
| 49 | ++ wait = True |
| 50 | ++ if setup['continue']: |
| 51 | ++ wait = False |
| 52 | ++ |
| 53 | + try: |
| 54 | +- debugger.connect(host, port) |
| 55 | ++ if wait: |
| 56 | ++ debugger.connect(host, port) |
| 57 | ++ else: |
| 58 | ++ debugger.create_wait_for_connection_thread() |
| 59 | + except: |
| 60 | + sys.stderr.write("Could not connect to %s: %s\n" % (host, port)) |
| 61 | + pydev_log.exception() |
| 62 | + sys.exit(1) |
| 63 | + |
| 64 | +- globals = debugger.run(setup['file'], None, None, is_module) |
| 65 | ++ globals = debugger.run(setup['file'], None, None, is_module, wait=wait) |
| 66 | + |
| 67 | + if setup['cmd-line']: |
| 68 | + debugger.wait_for_commands(globals) |
0 commit comments