Skip to content

Commit 51edcaf

Browse files
committed
suggested fixes
1 parent 54dfc07 commit 51edcaf

File tree

4 files changed

+42
-44
lines changed

4 files changed

+42
-44
lines changed

.vscode/launch.json

Lines changed: 32 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,35 @@
33
// Hover to view descriptions of existing attributes.
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/dist/**/*.js",
17-
"!${workspaceFolder}/**/node_modules**/*"
18-
],
19-
"preLaunchTask": "npm: watch",
20-
"presentation": {
21-
"hidden": false,
22-
"group": "",
23-
"order": 2
24-
}
25-
},
26-
{
27-
"name": "Unit Tests",
28-
"type": "extensionHost",
29-
"request": "launch",
30-
"runtimeExecutable": "${execPath}",
31-
"args": [
32-
"./out/test/**/*.unit.test.js",
33-
"--extensionDevelopmentPath=${workspaceFolder}",
34-
"--extensionTestsPath=${workspaceFolder}/out/test/unittest/index",
35-
//"--grep", "<suite name>",
36-
"--timeout=300000"
37-
],
38-
"outFiles": [
39-
"${workspaceFolder}/out/**/*.js",
40-
],
41-
"preLaunchTask": "tasks: watch-tests" },
42-
]
43-
}
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
13+
"outFiles": ["${workspaceFolder}/dist/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
14+
"preLaunchTask": "npm: watch",
15+
"presentation": {
16+
"hidden": false,
17+
"group": "",
18+
"order": 2
19+
}
20+
},
21+
{
22+
"name": "Unit Tests",
23+
"type": "extensionHost",
24+
"request": "launch",
25+
"runtimeExecutable": "${execPath}",
26+
"args": [
27+
"./out/test/**/*.unit.test.js",
28+
"--extensionDevelopmentPath=${workspaceFolder}",
29+
"--extensionTestsPath=${workspaceFolder}/out/test/unittest/index",
30+
//"--grep", "<suite name>",
31+
"--timeout=300000"
32+
],
33+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
34+
"preLaunchTask": "tasks: watch-tests"
35+
}
36+
]
37+
}

src/extension/noConfigDebugInit.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ export async function registerNoConfigDebug(context: IExtensionContext): Promise
6363
type: 'python',
6464
request: 'attach',
6565
name: 'Attach to Python',
66-
port: clientPort,
67-
host: 'localhost',
66+
connect: {
67+
port: clientPort,
68+
host: 'localhost',
69+
},
6870
},
6971
options,
7072
).then(

src/extension/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export function createFileSystemWatcher(args: any): FileSystemWatcher {
1212
return workspace.createFileSystemWatcher(args);
1313
}
1414

15-
export function debugStartDebugging(
15+
export async function debugStartDebugging(
1616
folder: WorkspaceFolder | undefined,
1717
nameOrConfiguration: string | DebugConfiguration,
1818
parentSessionOrOptions?: DebugSession | DebugSessionOptions,
19-
): Thenable<boolean> {
19+
): Promise<boolean> {
2020
return debug.startDebugging(folder, nameOrConfiguration, parentSessionOrOptions);
2121
}

src/test/unittest/noConfigDebugInit.unit.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ suite('setup for no-config debug scenario', function () {
135135
type: 'python',
136136
request: 'attach',
137137
name: 'Attach to Python',
138-
port: 5678,
139-
host: 'localhost',
138+
connect: {
139+
port: 5678,
140+
host: 'localhost',
141+
},
140142
};
141143
const optionsExpected: DebugSessionOptions = {
142144
noDebug: false,

0 commit comments

Comments
 (0)