From b2cc8af448142e86f491dacfb890d99b6a53de0f Mon Sep 17 00:00:00 2001 From: Bob White Date: Tue, 25 Aug 2020 15:39:48 -0500 Subject: [PATCH 1/2] Makes the listen process configurable. Basic idea for making the listen process configurable for applications that embed python, but aren't python processes. --- src/debugpy/server/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/debugpy/server/api.py b/src/debugpy/server/api.py index b1cf20a7d..784e1f7c8 100644 --- a/src/debugpy/server/api.py +++ b/src/debugpy/server/api.py @@ -25,6 +25,7 @@ _config = { "qt": "auto", "subProcess": True, + "process": sys.executable, } _config_valid_values = { @@ -166,7 +167,7 @@ def listen(address, settrace_kwargs): host, port = address adapter_args = [ - sys.executable, + _config.get('process', sys.executable), os.path.dirname(adapter.__file__), "--for-server", str(endpoints_port), From 466e2c86b65a87be95ff80b834b8570c8e80ab62 Mon Sep 17 00:00:00 2001 From: bob Date: Wed, 26 Aug 2020 14:38:21 -0500 Subject: [PATCH 2/2] Changing the config name from process to python. --- src/debugpy/server/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugpy/server/api.py b/src/debugpy/server/api.py index 784e1f7c8..0197c7ae9 100644 --- a/src/debugpy/server/api.py +++ b/src/debugpy/server/api.py @@ -25,7 +25,7 @@ _config = { "qt": "auto", "subProcess": True, - "process": sys.executable, + "python": sys.executable, } _config_valid_values = { @@ -167,7 +167,7 @@ def listen(address, settrace_kwargs): host, port = address adapter_args = [ - _config.get('process', sys.executable), + _config.get('python', sys.executable), os.path.dirname(adapter.__file__), "--for-server", str(endpoints_port),