forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathdebugService.ts
More file actions
77 lines (72 loc) · 2.6 KB
/
debugService.ts
File metadata and controls
77 lines (72 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { injectable } from 'inversify';
import {
Breakpoint,
BreakpointsChangeEvent,
debug,
DebugAdapterDescriptorFactory,
DebugConfiguration,
DebugConsole,
DebugSession,
DebugSessionCustomEvent,
DebugSessionOptions,
Disposable,
Event,
WorkspaceFolder,
} from 'vscode';
import { IDebugService } from './types';
@injectable()
export class DebugService implements IDebugService {
public static instance = new DebugService();
public get activeDebugConsole(): DebugConsole {
return debug.activeDebugConsole;
}
public get activeDebugSession(): DebugSession | undefined {
return debug.activeDebugSession;
}
public get breakpoints(): readonly Breakpoint[] {
return debug.breakpoints;
}
public get onDidChangeActiveDebugSession(): Event<DebugSession | undefined> {
return debug.onDidChangeActiveDebugSession;
}
public get onDidStartDebugSession(): Event<DebugSession> {
return debug.onDidStartDebugSession;
}
public get onDidReceiveDebugSessionCustomEvent(): Event<DebugSessionCustomEvent> {
return debug.onDidReceiveDebugSessionCustomEvent;
}
public get onDidTerminateDebugSession(): Event<DebugSession> {
return debug.onDidTerminateDebugSession;
}
public get onDidChangeBreakpoints(): Event<BreakpointsChangeEvent> {
return debug.onDidChangeBreakpoints;
}
public registerDebugConfigurationProvider(debugType: string, provider: any): Disposable {
return debug.registerDebugConfigurationProvider(debugType, provider);
}
public registerDebugAdapterTrackerFactory(debugType: string, provider: any): Disposable {
return debug.registerDebugAdapterTrackerFactory(debugType, provider);
}
public startDebugging(
folder: WorkspaceFolder | undefined,
nameOrConfiguration: string | DebugConfiguration,
parentSession?: DebugSession | DebugSessionOptions,
): Thenable<boolean> {
return debug.startDebugging(folder, nameOrConfiguration, parentSession);
}
public addBreakpoints(breakpoints: Breakpoint[]): void {
debug.addBreakpoints(breakpoints);
}
public removeBreakpoints(breakpoints: Breakpoint[]): void {
debug.removeBreakpoints(breakpoints);
}
public registerDebugAdapterDescriptorFactory(
debugType: string,
factory: DebugAdapterDescriptorFactory,
): Disposable {
return debug.registerDebugAdapterDescriptorFactory(debugType, factory);
}
}