Skip to content

Commit d6ce82b

Browse files
committed
refactor(ide): use the shared debug host in VS Code launch configs
1 parent 5f081de commit d6ce82b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎cli/src/coding_study/adapters/ide/vscode.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from collections.abc import Iterator
1212
from typing import Any
1313

14+
from coding_study.domain.debugging import DEBUG_HOST
1415
from coding_study.domain.ide import GeneratedFile, Ide
1516
from coding_study.domain.ide_actions import (
1617
BOTH_SCOPES,
@@ -33,7 +34,6 @@
3334
DIRECTORY = Ide.VSCODE.directory
3435
CURRENT_FILE = "${file}"
3536
WORKSPACE_FOLDER = "${workspaceFolder}"
36-
LOOPBACK = "127.0.0.1"
3737
TASKS_VERSION = "2.0.0"
3838
LAUNCH_VERSION = "0.2.0"
3939
INDENT = 2
@@ -177,15 +177,15 @@ def _debugger(attach: DebugAttach) -> JsonObject:
177177
case Language.PYTHON:
178178
return {
179179
"type": "debugpy",
180-
"connect": {"host": LOOPBACK, "port": attach.port},
180+
"connect": {"host": DEBUG_HOST, "port": attach.port},
181181
"justMyCode": True,
182182
}
183183
case Language.TYPESCRIPT:
184184
return {
185185
"type": "node",
186-
"address": LOOPBACK,
186+
"address": DEBUG_HOST,
187187
"port": attach.port,
188188
"skipFiles": ["<node_internals>/**"],
189189
}
190190
case _:
191-
return {"type": "java", "hostName": LOOPBACK, "port": attach.port}
191+
return {"type": "java", "hostName": DEBUG_HOST, "port": attach.port}

0 commit comments

Comments
 (0)