Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 84c6300

Browse files
Merge pull request #3542 from PowerShell/andschwa/stop-debugger
Allow PowerShell session to start and stop the debugger interface
2 parents a836475 + e6d768c commit 84c6300

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

‎.vscode/launch.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,6 @@
1616
],
1717
"preLaunchTask": "Build"
1818
},
19-
{
20-
"name": "Launch Extension (Build client only)",
21-
"type": "extensionHost",
22-
"request": "launch",
23-
"runtimeExecutable": "${execPath}",
24-
"args": [
25-
"--extensionDevelopmentPath=${workspaceFolder}"
26-
],
27-
"stopOnEntry": false,
28-
"sourceMaps": true,
29-
"outFiles": [
30-
"${workspaceFolder}/out/src/**/*.js"
31-
],
32-
"preLaunchTask": "Build"
33-
},
3419
{
3520
"name": "Launch Extension Tests",
3621
"type": "extensionHost",

‎.vscode/tasks.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,33 @@
4040
"label": "Restore",
4141
"type": "shell",
4242
"command": "Invoke-Build Restore",
43+
"problemMatcher": []
4344
},
4445
{
4546
"label": "Clean",
4647
"type": "shell",
4748
"command": "Invoke-Build Clean",
49+
"problemMatcher": []
4850
},
4951
{
5052
"label": "Build",
5153
"type": "shell",
5254
"command": "Invoke-Build Build",
53-
"group": "build",
55+
"problemMatcher": [],
56+
"group": "build"
5457
},
5558
{
5659
"label": "Test",
5760
"type": "shell",
5861
"command": "Invoke-Build Test",
59-
"group": "test",
62+
"problemMatcher": [],
63+
"group": "test"
6064
},
6165
{
6266
"label": "Package",
6367
"type": "shell",
6468
"command": "Invoke-Build Package",
69+
"problemMatcher": [],
6570
"group": "build"
6671
}
6772
]

‎src/features/DebugSession.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import { LanguageClientConsumer } from "../languageClientConsumer";
1818
export const StartDebuggerNotificationType =
1919
new NotificationType<void>("powerShell/startDebugger");
2020

21+
export const StopDebuggerNotificationType =
22+
new NotificationType<void>("powerShell/stopDebugger");
23+
2124
export class DebugSessionFeature extends LanguageClientConsumer
2225
implements DebugConfigurationProvider, vscode.DebugAdapterDescriptorFactory {
2326

@@ -61,6 +64,12 @@ export class DebugSessionFeature extends LanguageClientConsumer
6164
type: "PowerShell",
6265
name: "PowerShell Interactive Session",
6366
}));
67+
68+
languageClient.onNotification(
69+
StopDebuggerNotificationType,
70+
() =>
71+
vscode.debug.stopDebugging(undefined)
72+
);
6473
}
6574

6675
public async provideDebugConfigurations(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /