@opensumi/ide-debug 2.21.6-rc-1669620508.0 → 2.21.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/lib/browser/index.d.ts.map +1 -1
  2. package/lib/browser/index.js +9 -2
  3. package/lib/browser/index.js.map +1 -1
  4. package/lib/browser/preferences/launch-folder-preference-provider.d.ts +2 -2
  5. package/lib/browser/preferences/launch-folder-preference-provider.d.ts.map +1 -1
  6. package/lib/browser/preferences/launch-folder-preference-provider.js +2 -2
  7. package/lib/browser/preferences/launch-folder-preference-provider.js.map +1 -1
  8. package/lib/browser/view/configuration/debug-configuration.module.less +5 -5
  9. package/lib/browser/view/configuration/debug-configuration.view.d.ts.map +1 -1
  10. package/lib/browser/view/configuration/debug-configuration.view.js +1 -1
  11. package/lib/browser/view/configuration/debug-configuration.view.js.map +1 -1
  12. package/lib/browser/view/configuration/debug-toolbar.view.js +2 -2
  13. package/lib/browser/view/configuration/debug-toolbar.view.js.map +1 -1
  14. package/lib/browser/view/console/debug-console.module.less +1 -2
  15. package/lib/browser/view/console/debug-console.view.js +2 -2
  16. package/lib/browser/view/console/debug-console.view.js.map +1 -1
  17. package/lib/browser/view/variables/debug-variables.module.less +1 -2
  18. package/lib/browser/view/variables/debug-variables.view.js +1 -1
  19. package/lib/browser/view/variables/debug-variables.view.js.map +1 -1
  20. package/lib/browser/view/watch/debug-watch.module.less +1 -2
  21. package/lib/browser/view/watch/debug-watch.view.js +1 -1
  22. package/lib/browser/view/watch/debug-watch.view.js.map +1 -1
  23. package/package.json +24 -25
  24. package/src/browser/assets/breakpoint-conditional-disabled.svg +0 -4
  25. package/src/browser/assets/breakpoint-conditional-unverified.svg +0 -4
  26. package/src/browser/assets/breakpoint-conditional.svg +0 -4
  27. package/src/browser/assets/breakpoint-disabled.svg +0 -4
  28. package/src/browser/assets/breakpoint-hint.svg +0 -4
  29. package/src/browser/assets/breakpoint-log-disabled.svg +0 -4
  30. package/src/browser/assets/breakpoint-log-unverified.svg +0 -4
  31. package/src/browser/assets/breakpoint-log.svg +0 -4
  32. package/src/browser/assets/breakpoint-unsupported.svg +0 -4
  33. package/src/browser/assets/breakpoint-unverified.svg +0 -4
  34. package/src/browser/assets/breakpoint.svg +0 -4
  35. package/src/browser/assets/breakpoints-activate-inverse.svg +0 -4
  36. package/src/browser/assets/breakpoints-activate.svg +0 -4
  37. package/src/browser/assets/configure-inverse.svg +0 -4
  38. package/src/browser/assets/configure.svg +0 -4
  39. package/src/browser/assets/continue-inverse.svg +0 -4
  40. package/src/browser/assets/current-and-breakpoint.svg +0 -4
  41. package/src/browser/assets/current-arrow.svg +0 -4
  42. package/src/browser/assets/remove-all-inverse.svg +0 -4
  43. package/src/browser/assets/remove-all.svg +0 -4
  44. package/src/browser/assets/repl-inverse.svg +0 -4
  45. package/src/browser/assets/repl.svg +0 -4
  46. package/src/browser/assets/restart-inverse.svg +0 -4
  47. package/src/browser/assets/stackframe-and-breakpoint.svg +0 -4
  48. package/src/browser/assets/stackframe-arrow.svg +0 -4
  49. package/src/browser/assets/start-inverse.svg +0 -4
  50. package/src/browser/breakpoint/breakpoint-decoration.ts +0 -57
  51. package/src/browser/breakpoint/breakpoint-manager.ts +0 -348
  52. package/src/browser/breakpoint/breakpoint-marker.ts +0 -70
  53. package/src/browser/breakpoint/index.ts +0 -3
  54. package/src/browser/components/debug-action/index.module.less +0 -73
  55. package/src/browser/components/debug-action/index.tsx +0 -40
  56. package/src/browser/components/debug-exception-widget.less +0 -42
  57. package/src/browser/components/floating-click-widget/index.module.less +0 -5
  58. package/src/browser/components/floating-click-widget/index.tsx +0 -21
  59. package/src/browser/components/index.ts +0 -1
  60. package/src/browser/contextkeys/debug-call-stack-item-type-key.ts +0 -4
  61. package/src/browser/contextkeys/debug-contextkey.service.ts +0 -54
  62. package/src/browser/contextkeys/index.ts +0 -1
  63. package/src/browser/debug-ansi-handle.ts +0 -521
  64. package/src/browser/debug-configuration-manager.ts +0 -513
  65. package/src/browser/debug-configuration-model.ts +0 -66
  66. package/src/browser/debug-contribution.ts +0 -904
  67. package/src/browser/debug-exception-widget.tsx +0 -89
  68. package/src/browser/debug-link-detector.ts +0 -234
  69. package/src/browser/debug-memory.ts +0 -220
  70. package/src/browser/debug-preferences.ts +0 -70
  71. package/src/browser/debug-progress.service.ts +0 -122
  72. package/src/browser/debug-schema-updater.ts +0 -67
  73. package/src/browser/debug-service.ts +0 -42
  74. package/src/browser/debug-session-connection.ts +0 -333
  75. package/src/browser/debug-session-contribution.ts +0 -57
  76. package/src/browser/debug-session-manager.ts +0 -622
  77. package/src/browser/debug-session.ts +0 -1179
  78. package/src/browser/debug-style.less +0 -128
  79. package/src/browser/debugUtils.ts +0 -110
  80. package/src/browser/editor/debug-breakpoint-widget.ts +0 -99
  81. package/src/browser/editor/debug-breakpoint-zone-widget.tsx +0 -262
  82. package/src/browser/editor/debug-breakpoint.module.less +0 -31
  83. package/src/browser/editor/debug-editor-contribution.ts +0 -590
  84. package/src/browser/editor/debug-expression-provider.ts +0 -101
  85. package/src/browser/editor/debug-hover-model.ts +0 -38
  86. package/src/browser/editor/debug-hover-source.ts +0 -107
  87. package/src/browser/editor/debug-hover-tree.model.service.ts +0 -332
  88. package/src/browser/editor/debug-hover-widget.tsx +0 -200
  89. package/src/browser/editor/debug-hover.module.less +0 -29
  90. package/src/browser/editor/debug-hover.view.tsx +0 -147
  91. package/src/browser/editor/debug-model-manager.ts +0 -220
  92. package/src/browser/editor/debug-model.ts +0 -853
  93. package/src/browser/editor/debug-run-to-cursor.service.ts +0 -180
  94. package/src/browser/editor/debug-styles.ts +0 -66
  95. package/src/browser/editor/evaluatable-expression.ts +0 -47
  96. package/src/browser/editor/index.ts +0 -6
  97. package/src/browser/index.ts +0 -121
  98. package/src/browser/markers/index.ts +0 -2
  99. package/src/browser/markers/marker-manager.ts +0 -201
  100. package/src/browser/markers/marker.ts +0 -20
  101. package/src/browser/model/debug-source.ts +0 -144
  102. package/src/browser/model/debug-stack-frame.ts +0 -111
  103. package/src/browser/model/debug-thread.ts +0 -186
  104. package/src/browser/model/debug-watch.ts +0 -130
  105. package/src/browser/model/index.ts +0 -4
  106. package/src/browser/preferences/launch-folder-preference-provider.ts +0 -23
  107. package/src/browser/preferences/launch-preferences-contribution.ts +0 -9
  108. package/src/browser/preferences/launch-preferences.ts +0 -16
  109. package/src/browser/tree/debug-console-tree-node.define.tsx +0 -76
  110. package/src/browser/tree/debug-tree-node.define.ts +0 -768
  111. package/src/browser/tree/index.ts +0 -2
  112. package/src/browser/view/breakpoints/debug-breakpoints.module.less +0 -72
  113. package/src/browser/view/breakpoints/debug-breakpoints.service.ts +0 -217
  114. package/src/browser/view/breakpoints/debug-breakpoints.view.tsx +0 -174
  115. package/src/browser/view/configuration/debug-configuration.module.less +0 -110
  116. package/src/browser/view/configuration/debug-configuration.service.ts +0 -170
  117. package/src/browser/view/configuration/debug-configuration.view.tsx +0 -252
  118. package/src/browser/view/configuration/debug-toolbar.service.ts +0 -167
  119. package/src/browser/view/configuration/debug-toolbar.view.tsx +0 -335
  120. package/src/browser/view/console/debug-console-filter.model.ts +0 -49
  121. package/src/browser/view/console/debug-console-filter.service.ts +0 -81
  122. package/src/browser/view/console/debug-console-filter.view.tsx +0 -78
  123. package/src/browser/view/console/debug-console-model.ts +0 -48
  124. package/src/browser/view/console/debug-console-session.ts +0 -164
  125. package/src/browser/view/console/debug-console-toolbar.view.tsx +0 -28
  126. package/src/browser/view/console/debug-console-tree.model.service.ts +0 -550
  127. package/src/browser/view/console/debug-console.contribution.ts +0 -181
  128. package/src/browser/view/console/debug-console.module.less +0 -373
  129. package/src/browser/view/console/debug-console.service.ts +0 -433
  130. package/src/browser/view/console/debug-console.view.tsx +0 -500
  131. package/src/browser/view/debug-view-model.ts +0 -182
  132. package/src/browser/view/frames/debug-call-stack-frame.view.tsx +0 -224
  133. package/src/browser/view/frames/debug-call-stack-session.view.tsx +0 -237
  134. package/src/browser/view/frames/debug-call-stack-thread.view.tsx +0 -93
  135. package/src/browser/view/frames/debug-call-stack.contribution.ts +0 -88
  136. package/src/browser/view/frames/debug-call-stack.module.less +0 -193
  137. package/src/browser/view/frames/debug-call-stack.operation.tsx +0 -97
  138. package/src/browser/view/frames/debug-call-stack.service.ts +0 -105
  139. package/src/browser/view/frames/debug-call-stack.view.tsx +0 -43
  140. package/src/browser/view/variables/debug-variables-model.ts +0 -38
  141. package/src/browser/view/variables/debug-variables-tree.model.service.ts +0 -467
  142. package/src/browser/view/variables/debug-variables.contribution.ts +0 -244
  143. package/src/browser/view/variables/debug-variables.module.less +0 -149
  144. package/src/browser/view/variables/debug-variables.view.tsx +0 -303
  145. package/src/browser/view/watch/debug-watch-model.ts +0 -38
  146. package/src/browser/view/watch/debug-watch-tree.model.service.ts +0 -567
  147. package/src/browser/view/watch/debug-watch.contribution.ts +0 -167
  148. package/src/browser/view/watch/debug-watch.module.less +0 -189
  149. package/src/browser/view/watch/debug-watch.view.tsx +0 -337
  150. package/src/common/constants.ts +0 -81
  151. package/src/common/debug-breakpoint.ts +0 -43
  152. package/src/common/debug-configuration.ts +0 -68
  153. package/src/common/debug-editor.ts +0 -4
  154. package/src/common/debug-hover.ts +0 -31
  155. package/src/common/debug-model.ts +0 -247
  156. package/src/common/debug-progress.ts +0 -8
  157. package/src/common/debug-schema-updater.ts +0 -1
  158. package/src/common/debug-service.ts +0 -176
  159. package/src/common/debug-session-options.ts +0 -19
  160. package/src/common/debug-session.ts +0 -200
  161. package/src/common/evaluatable-expression.ts +0 -43
  162. package/src/common/index.ts +0 -14
  163. package/src/common/inline-values.ts +0 -77
  164. package/src/common/terminal.ts +0 -163
  165. package/src/common/types.ts +0 -86
  166. package/src/index.ts +0 -1
@@ -1,200 +0,0 @@
1
- import { CancellationToken, Event, IDisposable } from '@opensumi/ide-core-common';
2
- import { DebugProtocol } from '@opensumi/vscode-debugprotocol';
3
-
4
- import { DebugConfiguration } from './debug-configuration';
5
- import { DebugSessionOptions, IDebugSessionDTO } from './debug-session-options';
6
-
7
- export interface IDebugExceptionInfo {
8
- readonly id?: string;
9
- readonly description?: string;
10
- readonly breakMode: string | null;
11
- readonly details?: DebugProtocol.ExceptionDetails;
12
- }
13
-
14
- export enum DebugState {
15
- Inactive,
16
- Initializing,
17
- Running,
18
- Stopped,
19
- }
20
-
21
- export type IDebugSessionReplMode = 'separate' | 'mergeWithParent';
22
-
23
- export interface IDebugSessionOptions {
24
- noDebug?: boolean;
25
- parentSession?: IDebugSession;
26
- lifecycleManagedByParent?: boolean;
27
- repl?: IDebugSessionReplMode;
28
- compact?: boolean;
29
- }
30
-
31
- export const IDebugSession = Symbol('DebugSession');
32
-
33
- export const IDebugSessionManager = Symbol('DebugSessionManager');
34
- export interface IDebugSessionManager {
35
- fireWillStartDebugSession(): Promise<void>;
36
- resolveConfiguration(options: Readonly<DebugSessionOptions>): Promise<IDebugSessionDTO | undefined>;
37
- resolveDebugConfiguration(
38
- configuration: DebugConfiguration,
39
- workspaceFolderUri: string | undefined,
40
- ): Promise<DebugConfiguration | undefined | null>;
41
- fireWillResolveDebugConfiguration(debugType: string): Promise<void>;
42
- report(name: string, msg: string | undefined, extra?: any): void;
43
- reportTime(name: string, defaults?: any): (msg: string | undefined, extra?: any) => number;
44
- reportAction(sessionId: string, threadId: number | string | undefined, action: string): void;
45
- getExtra(sessionId: string | undefined, threadId: number | string | undefined): DebugThreadExtra | undefined;
46
- setExtra(sessionId: string, threadId: string, extra?: DebugThreadExtra);
47
-
48
- [key: string]: any;
49
- }
50
-
51
- export interface IDebugSession extends IDisposable {
52
- state: DebugState;
53
- parentSession: IDebugSession | undefined;
54
- id: string;
55
- capabilities: DebugProtocol.Capabilities;
56
- onDidInvalidateMemory: Event<DebugProtocol.MemoryEvent>;
57
- readMemory(
58
- memoryReference: string,
59
- offset: number,
60
- count: number,
61
- ): Promise<DebugProtocol.ReadMemoryResponse | undefined>;
62
- writeMemory(
63
- memoryReference: string,
64
- offset: number,
65
- data: string,
66
- allowPartial?: boolean | undefined,
67
- ): Promise<DebugProtocol.WriteMemoryResponse | undefined>;
68
- hasSeparateRepl: () => boolean;
69
- getDebugProtocolBreakpoint(breakpointId: string): DebugProtocol.Breakpoint | undefined;
70
- compact: boolean;
71
- on: <K extends keyof DebugEventTypes>(kind: K, listener: (e: DebugEventTypes[K]) => any) => IDisposable;
72
- sendRequest<K extends keyof DebugRequestTypes>(
73
- command: K,
74
- args: DebugRequestTypes[K][0],
75
- token?: CancellationToken | undefined,
76
- ): Promise<DebugRequestTypes[K][1]>;
77
- restart(): Promise<boolean>;
78
- disconnect(restart?: boolean | undefined): Promise<void>;
79
- terminate(restart?: boolean | undefined): Promise<void>;
80
- }
81
-
82
- /**
83
- * 埋点专用的额外数据
84
- */
85
- export interface DebugBaseExtra {
86
- /**
87
- * adapterID 区分语言
88
- */
89
- adapterID: string;
90
-
91
- /**
92
- * request 区分 attach 或 launch
93
- */
94
- request: 'attach' | 'launch';
95
-
96
- /**
97
- * 跟 sessionId 一一对应,先于 sessionId 生成,可以跟踪初始化时的事件
98
- */
99
- traceId: string;
100
-
101
- /**
102
- * 是否为远程调试
103
- * 0: 非远程
104
- * 1: 远程
105
- */
106
- remote: 0 | 1;
107
- }
108
- export interface DebugSessionExtra extends DebugBaseExtra {
109
- threads: Map<string, DebugThreadExtra>;
110
- }
111
-
112
- export interface DebugThreadExtra extends DebugBaseExtra {
113
- threadId?: string;
114
-
115
- /**
116
- * 当前的用户操作
117
- */
118
- action?: string;
119
-
120
- /**
121
- * 文件所在的路径和行号
122
- */
123
- filePath?: string;
124
- fileLineNumber?: number;
125
- }
126
-
127
- let DEBUG_SESSION_SEQUENCE_ID = 1;
128
-
129
- export function getSequenceId() {
130
- // 获取递增的请求 ID
131
- return DEBUG_SESSION_SEQUENCE_ID++;
132
- }
133
-
134
- export interface DebugExitEvent {
135
- code?: number;
136
- reason?: string | Error;
137
- }
138
- export interface DebugRequestTypes {
139
- attach: [DebugProtocol.AttachRequestArguments, DebugProtocol.AttachResponse];
140
- breakpointLocations: [DebugProtocol.BreakpointLocationsArguments, DebugProtocol.BreakpointLocationsResponse];
141
- completions: [DebugProtocol.CompletionsArguments, DebugProtocol.CompletionsResponse];
142
- configurationDone: [DebugProtocol.ConfigurationDoneArguments, DebugProtocol.ConfigurationDoneResponse];
143
- continue: [DebugProtocol.ContinueArguments, DebugProtocol.ContinueResponse];
144
- disconnect: [DebugProtocol.DisconnectArguments, DebugProtocol.DisconnectResponse];
145
- evaluate: [DebugProtocol.EvaluateArguments, DebugProtocol.EvaluateResponse];
146
- exceptionInfo: [DebugProtocol.ExceptionInfoArguments, DebugProtocol.ExceptionInfoResponse];
147
- goto: [DebugProtocol.GotoArguments, DebugProtocol.GotoResponse];
148
- gotoTargets: [DebugProtocol.GotoTargetsArguments, DebugProtocol.GotoTargetsResponse];
149
- initialize: [DebugProtocol.InitializeRequestArguments, DebugProtocol.InitializeResponse];
150
- launch: [DebugProtocol.LaunchRequestArguments, DebugProtocol.LaunchResponse];
151
- loadedSources: [DebugProtocol.LoadedSourcesArguments, DebugProtocol.LoadedSourcesResponse];
152
- modules: [DebugProtocol.ModulesArguments, DebugProtocol.ModulesResponse];
153
- next: [DebugProtocol.NextArguments, DebugProtocol.NextResponse];
154
- pause: [DebugProtocol.PauseArguments, DebugProtocol.PauseResponse];
155
- restart: [DebugProtocol.RestartArguments, DebugProtocol.RestartResponse];
156
- restartFrame: [DebugProtocol.RestartFrameArguments, DebugProtocol.RestartFrameResponse];
157
- reverseContinue: [DebugProtocol.ReverseContinueArguments, DebugProtocol.ReverseContinueResponse];
158
- scopes: [DebugProtocol.ScopesArguments, DebugProtocol.ScopesResponse];
159
- setBreakpoints: [DebugProtocol.SetBreakpointsArguments, DebugProtocol.SetBreakpointsResponse];
160
- setExceptionBreakpoints: [
161
- DebugProtocol.SetExceptionBreakpointsArguments,
162
- DebugProtocol.SetExceptionBreakpointsResponse,
163
- ];
164
- setExpression: [DebugProtocol.SetExpressionArguments, DebugProtocol.SetExpressionResponse];
165
- setFunctionBreakpoints: [DebugProtocol.SetFunctionBreakpointsArguments, DebugProtocol.SetFunctionBreakpointsResponse];
166
- setVariable: [DebugProtocol.SetVariableArguments, DebugProtocol.SetVariableResponse];
167
- source: [DebugProtocol.SourceArguments, DebugProtocol.SourceResponse];
168
- stackTrace: [DebugProtocol.StackTraceArguments, DebugProtocol.StackTraceResponse];
169
- stepBack: [DebugProtocol.StepBackArguments, DebugProtocol.StepBackResponse];
170
- stepIn: [DebugProtocol.StepInArguments, DebugProtocol.StepInResponse];
171
- stepInTargets: [DebugProtocol.StepInTargetsArguments, DebugProtocol.StepInTargetsResponse];
172
- stepOut: [DebugProtocol.StepOutArguments, DebugProtocol.StepOutResponse];
173
- terminate: [DebugProtocol.TerminateArguments, DebugProtocol.TerminateResponse];
174
- terminateThreads: [DebugProtocol.TerminateThreadsArguments, DebugProtocol.TerminateThreadsResponse];
175
- threads: [DebugProtocol.ThreadsArguments | null, DebugProtocol.ThreadsResponse];
176
- variables: [DebugProtocol.VariablesArguments, DebugProtocol.VariablesResponse];
177
- cancel: [DebugProtocol.CancelArguments, DebugProtocol.CancelResponse];
178
- readMemory: [DebugProtocol.ReadMemoryArguments, DebugProtocol.ReadMemoryResponse];
179
- writeMemory: [DebugProtocol.WriteMemoryArguments, DebugProtocol.WriteMemoryResponse];
180
- }
181
-
182
- export interface DebugEventTypes {
183
- breakpoint: DebugProtocol.BreakpointEvent;
184
- capabilities: DebugProtocol.CapabilitiesEvent;
185
- continued: DebugProtocol.ContinuedEvent;
186
- exited: DebugExitEvent;
187
- initialized: DebugProtocol.InitializedEvent;
188
- loadedSource: DebugProtocol.LoadedSourceEvent;
189
- module: DebugProtocol.ModuleEvent;
190
- output: DebugProtocol.OutputEvent;
191
- process: DebugProtocol.ProcessEvent;
192
- stopped: DebugProtocol.StoppedEvent;
193
- terminated: DebugProtocol.TerminatedEvent;
194
- thread: DebugProtocol.ThreadEvent;
195
- progressStart: DebugProtocol.ProgressStartEvent;
196
- progressUpdate: DebugProtocol.ProgressUpdateEvent;
197
- progressEnd: DebugProtocol.ProgressEndEvent;
198
- memory: DebugProtocol.MemoryEvent;
199
- invalidated: DebugProtocol.InvalidatedEvent;
200
- }
@@ -1,43 +0,0 @@
1
- import { CancellationToken } from '@opensumi/ide-core-common';
2
- import { IRange, Position } from '@opensumi/ide-core-common/lib/types';
3
- import type { ITextModel } from '@opensumi/monaco-editor-core/esm/vs/editor/common/model';
4
-
5
- /**
6
- * An evaluatable expression represents additional information for an expression in a document. Evaluatable expressions are
7
- * evaluated by a debugger or runtime and their result is rendered in a tooltip-like widget.
8
- * @internal
9
- */
10
- export interface IEvaluatableExpression {
11
- /**
12
- * The range to which this expression applies.
13
- */
14
- range: IRange;
15
- /**
16
- * This expression overrides the expression extracted from the range.
17
- */
18
- expression?: string;
19
- }
20
-
21
- /**
22
- * The evaluatable expression provider interface defines the contract between extensions and
23
- * the debug hover. In this contract the provider returns an evaluatable expression for a given position
24
- * in a document and VS Code evaluates this expression in the active debug session and shows the result in a debug hover.
25
- */
26
- export interface EvaluatableExpressionProvider {
27
- /**
28
- * Provide an evaluatable expression for the given document and position.
29
- * VS Code will evaluate this expression in the active debug session and will show the result in the debug hover.
30
- * The expression can be implicitly specified by the range in the underlying document or by explicitly returning an expression.
31
- *
32
- * @param document The document for which the debug hover is about to appear.
33
- * @param position The line and character position in the document where the debug hover is about to appear.
34
- * @param token A cancellation token.
35
- * @return An EvaluatableExpression or a thenable that resolves to such. The lack of a result can be
36
- * signaled by returning `undefined` or `null`.
37
- */
38
- provideEvaluatableExpression(
39
- document: ITextModel,
40
- position: Position,
41
- token: CancellationToken,
42
- ): PromiseLike<IEvaluatableExpression | undefined>;
43
- }
@@ -1,14 +0,0 @@
1
- export * from './debug-configuration';
2
- export * from './debug-service';
3
- export * from './debug-hover';
4
- export * from './debug-breakpoint';
5
- export * from './debug-model';
6
- export * from './debug-session';
7
- export * from './debug-session-options';
8
- export * from './debug-editor';
9
- export * from './debug-progress';
10
- export * from './debug-schema-updater';
11
- export * from './inline-values';
12
- export * from './types';
13
- export * from './constants';
14
- export * from './terminal';
@@ -1,77 +0,0 @@
1
- import { IRange, CancellationToken, Event } from '@opensumi/ide-core-common';
2
- import { Range } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/range';
3
- import { ITextModel } from '@opensumi/monaco-editor-core/esm/vs/editor/common/model';
4
-
5
- // Inline Values
6
- /**
7
- * A value-object that contains contextual information when requesting inline values from a InlineValuesProvider.
8
- * @internal
9
- */
10
- export interface InlineValueContext {
11
- frameId: number;
12
- stoppedLocation: Range;
13
- }
14
-
15
- /**
16
- * Provide inline value as text.
17
- * @internal
18
- */
19
- export interface InlineValueText {
20
- type: 'text';
21
- range: IRange;
22
- text: string;
23
- }
24
-
25
- /**
26
- * Provide inline value through a variable lookup.
27
- * @internal
28
- */
29
- export interface InlineValueVariableLookup {
30
- type: 'variable';
31
- range: IRange;
32
- variableName?: string;
33
- caseSensitiveLookup: boolean;
34
- }
35
-
36
- /**
37
- * Provide inline value through an expression evaluation.
38
- * @internal
39
- */
40
- export interface InlineValueExpression {
41
- type: 'expression';
42
- range: IRange;
43
- expression?: string;
44
- }
45
-
46
- /**
47
- * Inline value information can be provided by different means:
48
- * - directly as a text value (class InlineValueText).
49
- * - as a name to use for a variable lookup (class InlineValueVariableLookup)
50
- * - as an evaluatable expression (class InlineValueEvaluatableExpression)
51
- * The InlineValue types combines all inline value types into one type.
52
- * @internal
53
- */
54
- export type InlineValue = InlineValueText | InlineValueVariableLookup | InlineValueExpression;
55
-
56
- /**
57
- * The inline values provider interface defines the contract between extensions and
58
- * the debugger's inline values feature.
59
- * @internal
60
- */
61
- export interface InlineValuesProvider {
62
- /**
63
- */
64
- onDidChangeInlineValues?: Event<void> | undefined;
65
- /**
66
- * Provide the "inline values" for the given range and document. Multiple hovers at the same
67
- * position will be merged by the editor. A hover can have a range which defaults
68
- * to the word range at the position when omitted.
69
- */
70
- provideInlineValues(
71
- model: ITextModel,
72
- viewPort: Range,
73
- context: InlineValueContext,
74
- token: CancellationToken,
75
- ): Thenable<InlineValue[]>;
76
- }
77
- // End Inline Values
@@ -1,163 +0,0 @@
1
- /* eslint-disable guard-for-in */
2
- import { CharCode, isWindows } from '@opensumi/ide-core-common';
3
-
4
- const enum ShellType {
5
- cmd,
6
- powershell,
7
- bash,
8
- }
9
-
10
- export function isWindowsDriveLetter(char0: number): boolean {
11
- return (char0 >= CharCode.A && char0 <= CharCode.Z) || (char0 >= CharCode.a && char0 <= CharCode.z);
12
- }
13
-
14
- export function hasDriveLetter(path: string, isWindowsOS: boolean = isWindows): boolean {
15
- if (isWindowsOS) {
16
- return isWindowsDriveLetter(path.charCodeAt(0)) && path.charCodeAt(1) === CharCode.Colon;
17
- }
18
-
19
- return false;
20
- }
21
-
22
- export function getDriveLetter(path: string): string | undefined {
23
- return hasDriveLetter(path) ? path[0] : undefined;
24
- }
25
-
26
- export function prepareCommand(
27
- shell: string,
28
- args: string[],
29
- argsCanBeInterpretedByShell: boolean,
30
- cwd?: string,
31
- env?: { [key: string]: string | null },
32
- ): string {
33
- shell = shell.trim().toLowerCase();
34
-
35
- // try to determine the shell type
36
- let shellType;
37
- if (shell.indexOf('powershell') >= 0 || shell.indexOf('pwsh') >= 0) {
38
- shellType = ShellType.powershell;
39
- } else if (shell.indexOf('cmd.exe') >= 0) {
40
- shellType = ShellType.cmd;
41
- } else if (shell.indexOf('bash') >= 0) {
42
- shellType = ShellType.bash;
43
- } else if (isWindows) {
44
- shellType = ShellType.cmd; // pick a good default for Windows
45
- } else {
46
- shellType = ShellType.bash; // pick a good default for anything else
47
- }
48
-
49
- let quote: (s: string) => string;
50
- // begin command with a space to avoid polluting shell history
51
- let command = ' ';
52
-
53
- switch (shellType) {
54
- case ShellType.powershell:
55
- quote = (s: string) => {
56
- s = s.replace(/'/g, "''");
57
- if (s.length > 0 && s.charAt(s.length - 1) === '\\') {
58
- return `'${s}\\'`;
59
- }
60
- return `'${s}'`;
61
- };
62
-
63
- if (cwd) {
64
- const driveLetter = getDriveLetter(cwd);
65
- if (driveLetter) {
66
- command += `${driveLetter}:; `;
67
- }
68
- command += `cd ${quote(cwd)}; `;
69
- }
70
- if (env) {
71
- for (const key in env) {
72
- const value = env[key];
73
- if (value === null) {
74
- command += `Remove-Item env:${key}; `;
75
- } else {
76
- command += `\${env:${key}}='${value}'; `;
77
- }
78
- }
79
- }
80
- if (args.length > 0) {
81
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
82
- const arg = args.shift()!;
83
- const cmd = argsCanBeInterpretedByShell ? arg : quote(arg);
84
- command += cmd[0] === "'" ? `& ${cmd} ` : `${cmd} `;
85
- for (const a of args) {
86
- command += a === '<' || a === '>' || argsCanBeInterpretedByShell ? a : quote(a);
87
- command += ' ';
88
- }
89
- }
90
- break;
91
-
92
- case ShellType.cmd:
93
- quote = (s: string) => {
94
- // Note: Wrapping in cmd /C "..." complicates the escaping.
95
- // cmd /C "node -e "console.log(process.argv)" """A^>0"""" # prints "A>0"
96
- // cmd /C "node -e "console.log(process.argv)" "foo^> bar"" # prints foo> bar
97
- // Outside of the cmd /C, it could be a simple quoting, but here, the ^ is needed too
98
- s = s.replace(/"/g, '""');
99
- s = s.replace(/([><!^&|])/g, '^$1');
100
- return ' "'.split('').some((char) => s.includes(char)) || s.length === 0 ? `"${s}"` : s;
101
- };
102
-
103
- if (cwd) {
104
- const driveLetter = getDriveLetter(cwd);
105
- if (driveLetter) {
106
- command += `${driveLetter}: && `;
107
- }
108
- command += `cd ${quote(cwd)} && `;
109
- }
110
- if (env) {
111
- command += 'cmd /C "';
112
- for (const key in env) {
113
- let value = env[key];
114
- if (value === null) {
115
- command += `set "${key}=" && `;
116
- } else {
117
- value = value.replace(/[&^|<>]/g, (s) => `^${s}`);
118
- command += `set "${key}=${value}" && `;
119
- }
120
- }
121
- }
122
- for (const a of args) {
123
- command += a === '<' || a === '>' || argsCanBeInterpretedByShell ? a : quote(a);
124
- command += ' ';
125
- }
126
- if (env) {
127
- command += '"';
128
- }
129
- break;
130
-
131
- case ShellType.bash: {
132
- quote = (s: string) => {
133
- s = s.replace(/(["'\\$!><#()[\]*&^| ;{}`])/g, '\\$1');
134
- return s.length === 0 ? '""' : s;
135
- };
136
-
137
- const hardQuote = (s: string) => (/[^\w@%/+=,.:^-]/.test(s) ? `'${s.replace(/'/g, "'\\''")}'` : s);
138
-
139
- if (cwd) {
140
- command += `cd ${quote(cwd)} ; `;
141
- }
142
- if (env) {
143
- command += '/usr/bin/env';
144
- for (const key in env) {
145
- const value = env[key];
146
- if (value === null) {
147
- command += ` -u ${hardQuote(key)}`;
148
- } else {
149
- command += ` ${hardQuote(`${key}=${value}`)}`;
150
- }
151
- }
152
- command += ' ';
153
- }
154
- for (const a of args) {
155
- command += a === '<' || a === '>' || argsCanBeInterpretedByShell ? a : quote(a);
156
- command += ' ';
157
- }
158
- break;
159
- }
160
- }
161
-
162
- return command;
163
- }
@@ -1,86 +0,0 @@
1
- import { IJSONSchemaSnippet } from '@opensumi/ide-core-common';
2
-
3
- export interface CallStackContext {
4
- sessionId: string;
5
- threadId: string;
6
- frameId: string;
7
- }
8
-
9
- export interface IPlatformSpecificAdapterContribution {
10
- program?: string;
11
- args?: string[];
12
- runtime?: string;
13
- runtimeArgs?: string[];
14
- }
15
-
16
- export interface IDebuggerContribution extends IPlatformSpecificAdapterContribution {
17
- type: string;
18
- label?: string;
19
- // debug adapter executable
20
- adapterExecutableCommand?: string;
21
- win?: IPlatformSpecificAdapterContribution;
22
- winx86?: IPlatformSpecificAdapterContribution;
23
- windows?: IPlatformSpecificAdapterContribution;
24
- osx?: IPlatformSpecificAdapterContribution;
25
- linux?: IPlatformSpecificAdapterContribution;
26
-
27
- // internal
28
- aiKey?: string;
29
-
30
- // supported languages
31
- languages?: string[];
32
- enableBreakpointsFor?: { languageIds: string[] };
33
-
34
- // debug configuration support
35
- configurationAttributes?: any;
36
- initialConfigurations?: any[];
37
- configurationSnippets?: IJSONSchemaSnippet[];
38
- variables?: { [key: string]: string };
39
- }
40
-
41
- export enum DEBUG_REPORT_NAME {
42
- /**
43
- * 启动调试响应耗时
44
- */
45
- DEBUG_SESSION_START_TIME = 'debugSessionStartTime',
46
- /**
47
- * preLaunchTask 耗时
48
- */
49
- DEBUG_PRE_LAUNCH_TASK_TIME = 'debugPreLaunchTaskTime',
50
- /**
51
- * 工具栏各操作响应耗时
52
- */
53
- DEBUG_TOOLBAR_OPERATION_TIME = 'debugToolBarOperationTime',
54
- /**
55
- * 工具栏各操作点击
56
- */
57
- DEBUG_TOOLBAR_OPERATION = 'debugToolBarOperation',
58
- /**
59
- * 左侧所有面板展开收起点击
60
- */
61
- DEBUG_PANEL_OPERATION_FOLDEXPR = 'debugPanelOperationFoldexpr',
62
- /**
63
- * 监听
64
- */
65
- DEBUG_WATCH = 'debugWatch',
66
- /**
67
- * 变量
68
- */
69
- DEBUG_VARIABLES = 'debugVariables',
70
- /**
71
- * 断点
72
- */
73
- DEBUG_BREAKPOINT = 'debugBreakpoint',
74
- /**
75
- * DAP 请求和响应耗时
76
- */
77
- DEBUG_ADAPTER_PROTOCOL_TIME = 'debugAdapterProtocolTime',
78
- /**
79
- * 断点命中
80
- */
81
- DEBUG_STOPPED = 'debugStopped',
82
- /**
83
- * 前端 UI 渲染层耗时
84
- */
85
- DEBUG_UI_FRONTEND_TIME = 'debugFrontEndTime',
86
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './common';