MCPcopy
hub / github.com/microsoft/vscode-js-debug / ITarget

Interface ITarget

src/targets/targets.ts:22–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 * actually get a debug adapter API.
21 */
22export interface ITarget {
23 /**
24 * Launch configuration for the target. This is used to inject into the IOC
25 * in cases where a target's configuration is different than its parent's
26 * (e.g. webview debugging in the extension host).
27 */
28 readonly launchConfig: AnyLaunchConfiguration;
29
30 /**
31 * Launcher's target info.
32 */
33 readonly targetInfo: Readonly<Cdp.Target.TargetInfo>;
34
35 /**
36 * Additional launch config information that should be passed into the
37 * child debug session's configuration.
38 */
39 readonly supplementalConfig?: Record<string, unknown>;
40
41 /**
42 * Whether the lifecycle for this target can be stopped, restarted, etc.
43 * independently of its parents.
44 */
45 readonly independentLifeycle?: boolean;
46
47 /**
48 * Source path resolver, if a custom one should be used for this target.
49 */
50 readonly sourcePathResolver?: ISourcePathResolver;
51
52 id(): string;
53 name(): string;
54 onNameChanged: IEvent<void>;
55 fileName(): string | undefined;
56 type(): string;
57 parent(): ITarget | undefined;
58 canStop(): boolean;
59 stop(): void;
60 canRestart(): boolean;
61 restart(): void;
62 canAttach(): boolean;
63 attach(): Promise<Cdp.Api | undefined>;
64 canDetach(): boolean;
65 detach(): Promise<void>;
66 targetOrigin(): ITargetOrigin;
67 /**
68 * Lifecycle callback invoked after attaching and the target's events are
69 * wired into the debug adapter.
70 */
71 afterBind(): Promise<void>;
72
73 /**
74 * Called after the launchBlocker resolves. Signals that we're all set up
75 * and ready to start debugging the target.
76 */
77 runIfWaitingForDebugger(): Promise<void>;
78
79 initialize(): Promise<void>;

Callers 72

acquireDapMethod · 0.65
initAdapterMethod · 0.65
releaseDapMethod · 0.65
launchMethod · 0.65
getOrLaunchSessionMethod · 0.65
_initMethod · 0.65
stopMethod · 0.65
_attachToNewTargetsMethod · 0.65
acquireDapMethod · 0.65
launchMethod · 0.65

Implementers 3

BrowserTargetsrc/targets/browser/browserTargets.ts
NodeTargetsrc/targets/node/nodeTarget.ts
NodeWorkerTargetsrc/targets/node/nodeWorkerTarget.ts

Calls

no outgoing calls

Tested by

no test coverage detected