Skip to content

Commit b14877c

Browse files
committed
refactor(debugger): some code simplifications
1 parent 9d54d25 commit b14877c

File tree

1 file changed

+4
-5
lines changed
  • packages/debugger/src/robotcode/debugger

1 file changed

+4
-5
lines changed

packages/debugger/src/robotcode/debugger/run.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,10 @@ def start_debugpy(
114114
if port != debugpy_port:
115115
_logger.warning(lambda: f"start debugpy session on port {port}")
116116

117-
# this is set by vscode for non config debugpy sessions, we don't need it, so remove it
118-
if "DEBUGPY_ADAPTER_ENDPOINTS" in os.environ:
119-
del os.environ["DEBUGPY_ADAPTER_ENDPOINTS"]
120-
if "VSCODE_DEBUGPY_ADAPTER_ENDPOINTS" in os.environ:
121-
del os.environ["VSCODE_DEBUGPY_ADAPTER_ENDPOINTS"]
117+
# remove unwanted env variables
118+
for env_var in ["DEBUGPY_ADAPTER_ENDPOINTS", "VSCODE_DEBUGPY_ADAPTER_ENDPOINTS"]:
119+
if env_var in os.environ:
120+
del os.environ[env_var]
122121

123122
if enable_debugpy(port, addresses):
124123
global config_done_callback

0 commit comments

Comments
 (0)