@theia/debug 1.58.2 → 1.59.0-next.62

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 (67) hide show
  1. package/lib/browser/console/debug-console-contribution.d.ts +2 -0
  2. package/lib/browser/console/debug-console-contribution.d.ts.map +1 -1
  3. package/lib/browser/console/debug-console-contribution.js +6 -0
  4. package/lib/browser/console/debug-console-contribution.js.map +1 -1
  5. package/lib/browser/debug-frontend-module.d.ts.map +1 -1
  6. package/lib/browser/debug-frontend-module.js +2 -0
  7. package/lib/browser/debug-frontend-module.js.map +1 -1
  8. package/lib/browser/debug-session-configuration-label-provider.d.ts +11 -0
  9. package/lib/browser/debug-session-configuration-label-provider.d.ts.map +1 -0
  10. package/lib/browser/debug-session-configuration-label-provider.js +48 -0
  11. package/lib/browser/debug-session-configuration-label-provider.js.map +1 -0
  12. package/lib/browser/debug-session-configuration-label-provider.spec.d.ts +2 -0
  13. package/lib/browser/debug-session-configuration-label-provider.spec.d.ts.map +1 -0
  14. package/lib/browser/debug-session-configuration-label-provider.spec.js +84 -0
  15. package/lib/browser/debug-session-configuration-label-provider.spec.js.map +1 -0
  16. package/lib/browser/debug-session-manager.d.ts +2 -0
  17. package/lib/browser/debug-session-manager.d.ts.map +1 -1
  18. package/lib/browser/debug-session-manager.js +18 -0
  19. package/lib/browser/debug-session-manager.js.map +1 -1
  20. package/lib/browser/debug-session-options.d.ts +1 -0
  21. package/lib/browser/debug-session-options.d.ts.map +1 -1
  22. package/lib/browser/debug-session-options.js.map +1 -1
  23. package/lib/browser/debug-session.js +2 -2
  24. package/lib/browser/debug-session.js.map +1 -1
  25. package/lib/browser/editor/debug-breakpoint-widget.d.ts +5 -1
  26. package/lib/browser/editor/debug-breakpoint-widget.d.ts.map +1 -1
  27. package/lib/browser/editor/debug-breakpoint-widget.js +12 -3
  28. package/lib/browser/editor/debug-breakpoint-widget.js.map +1 -1
  29. package/lib/browser/view/debug-configuration-select.d.ts +2 -0
  30. package/lib/browser/view/debug-configuration-select.d.ts.map +1 -1
  31. package/lib/browser/view/debug-configuration-select.js +1 -6
  32. package/lib/browser/view/debug-configuration-select.js.map +1 -1
  33. package/lib/browser/view/debug-configuration-widget.d.ts +2 -0
  34. package/lib/browser/view/debug-configuration-widget.d.ts.map +1 -1
  35. package/lib/browser/view/debug-configuration-widget.js +10 -1
  36. package/lib/browser/view/debug-configuration-widget.js.map +1 -1
  37. package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -1
  38. package/lib/browser/view/debug-toolbar-widget.js +1 -1
  39. package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
  40. package/lib/browser/view/debug-view-model.d.ts +2 -1
  41. package/lib/browser/view/debug-view-model.d.ts.map +1 -1
  42. package/lib/browser/view/debug-view-model.js +3 -2
  43. package/lib/browser/view/debug-view-model.js.map +1 -1
  44. package/lib/common/debug-adapter-session.d.ts.map +1 -1
  45. package/lib/common/debug-adapter-session.js.map +1 -1
  46. package/lib/common/debug-configuration.d.ts +2 -0
  47. package/lib/common/debug-configuration.d.ts.map +1 -1
  48. package/lib/common/debug-configuration.js.map +1 -1
  49. package/lib/node/debug-backend-module.d.ts.map +1 -1
  50. package/lib/node/debug-backend-module.js +0 -1
  51. package/lib/node/debug-backend-module.js.map +1 -1
  52. package/package.json +16 -16
  53. package/src/browser/console/debug-console-contribution.tsx +5 -0
  54. package/src/browser/debug-frontend-module.ts +3 -0
  55. package/src/browser/debug-session-configuration-label-provider.spec.ts +98 -0
  56. package/src/browser/debug-session-configuration-label-provider.ts +46 -0
  57. package/src/browser/debug-session-manager.ts +20 -1
  58. package/src/browser/debug-session-options.ts +7 -6
  59. package/src/browser/debug-session.tsx +2 -2
  60. package/src/browser/editor/debug-breakpoint-widget.tsx +13 -3
  61. package/src/browser/view/debug-configuration-select.tsx +3 -5
  62. package/src/browser/view/debug-configuration-widget.tsx +10 -0
  63. package/src/browser/view/debug-toolbar-widget.tsx +1 -1
  64. package/src/browser/view/debug-view-model.ts +5 -3
  65. package/src/common/debug-adapter-session.ts +0 -1
  66. package/src/common/debug-configuration.ts +3 -0
  67. package/src/node/debug-backend-module.ts +1 -5
@@ -1 +1 @@
1
- {"version":3,"file":"debug-adapter-session.js","sourceRoot":"","sources":["../../src/common/debug-adapter-session.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAgBhF;;GAEG;AACH,MAAa,uBAAuB;IAKhC,YACa,EAAU,EACA,YAA0B;QADpC,OAAE,GAAF,EAAE,CAAQ;QACA,iBAAY,GAAZ,YAAY,CAAc;QAJzC,aAAQ,GAAY,KAAK,CAAC;QAM9B,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC,OAAe,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;IAExE,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAqB;QAE7B,OAAO,CAAC,KAAK,CAAC,mCAAmC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAC7D,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,4CAA4C,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAA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AI,CAAC,QAAQ,EAAE,CAAC;YACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI;;QACN,OAAO,CAAC,KAAK,CAAC,oCAAoC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QAE9D,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QACnC,CAAC;QACD,MAAA,IAAI,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC7B,CAAC;CACJ;AAnED,0DAmEC"}
@@ -50,6 +50,8 @@ export interface DebugConfiguration {
50
50
  suppressDebugStatusbar?: boolean;
51
51
  /** When true, the debug viewlet will not be automatically revealed for this session. */
52
52
  suppressDebugView?: boolean;
53
+ /** Disable the warning when trying to start the same debug configuration more than once. */
54
+ suppressMultipleSessionWarning?: boolean;
53
55
  }
54
56
  export declare namespace DebugConfiguration {
55
57
  function is(arg: unknown): arg is DebugConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"debug-configuration.d.ts","sourceRoot":"","sources":["../../src/common/debug-configuration.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAEnB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAE/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MA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B;IAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,OAAO,CAAC,EAAE;QACN,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAA;KAChB,CAAA;CACJ;AAED,oBAAY,gBAAgB;IACxB,QAAQ,IAAI;IACZ,eAAe,IAAI;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"debug-configuration.js","sourceRoot":"","sources":["../../src/common/debug-configuration.ts"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,mDAAkD;AAwElD,IAAiB,kBAAkB,CAIlC;AAJD,WAAiB,kBAAkB;IAC/B,SAAgB,EAAE,CAAC,GAAY;QAC3B,OAAO,IAAA,iBAAQ,EAAC,GAAG,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAAC;IAC/E,CAAC;IAFe,qBAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,kBAAkB,kCAAlB,kBAAkB,QAIlC;AAiBD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+DAAY,CAAA;IACZ,6EAAmB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
1
+ {"version":3,"file":"debug-configuration.js","sourceRoot":"","sources":["../../src/common/debug-configuration.ts"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,mDAAkD;AA2ElD,IAAiB,kBAAkB,CAIlC;AAJD,WAAiB,kBAAkB;IAC/B,SAAgB,EAAE,CAAC,GAAY;QAC3B,OAAO,IAAA,iBAAQ,EAAC,GAAG,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,CAAC;IAC/E,CAAC;IAFe,qBAAE,KAEjB,CAAA;AACL,CAAC,EAJgB,kBAAkB,kCAAlB,kBAAkB,QAIlC;AAiBD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+DAAY,CAAA;IACZ,6EAAmB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"debug-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/debug-backend-module.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AA4B/D,wBAWG"}
1
+ {"version":3,"file":"debug-backend-module.d.ts","sourceRoot":"","sources":["../../src/node/debug-backend-module.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AA4B/D,wBAOG"}
@@ -37,6 +37,5 @@ exports.default = new inversify_1.ContainerModule(bind => {
37
37
  bind(debug_model_1.DebugAdapterFactory).to(debug_adapter_factory_1.LaunchBasedDebugAdapterFactory).inSingletonScope();
38
38
  bind(debug_adapter_session_manager_1.DebugAdapterSessionManager).toSelf().inSingletonScope();
39
39
  bind(messaging_service_1.MessagingService.Contribution).toService(debug_adapter_session_manager_1.DebugAdapterSessionManager);
40
- bind(common_1.ILogger).toDynamicValue(({ container }) => container.get(common_1.ILogger).child('debug')).inSingletonScope().whenTargetNamed('debug');
41
40
  });
42
41
  //# sourceMappingURL=debug-backend-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"debug-backend-module.js","sourceRoot":"","sources":["../../src/node/debug-backend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,mDAA2E;AAC3E,4DAA+D;AAC/D,2DAGiC;AACjC,mEAGiC;AACjC,wFAAoF;AACpF,4GAAuG;AACvG,uDAI+B;AAC/B,6DAAwD;AACxD,uGAAiG;AACjG,mFAA6E;AAE7E,MAAM,qBAAqB,GAAG,uDAAyB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE;IAC5F,IAAA,iCAAwB,EAAC,IAAI,EAAE,sCAAwB,CAAC,CAAC;IACzD,IAAI,CAAC,sEAAgC,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAEnE,IAAI,CAAC,4BAAY,CAAC,CAAC,EAAE,CAAC,qCAAgB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC3D,kBAAkB,CAAC,yBAAS,EAAE,4BAAY,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,uDAAyB,CAAC,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAEvE,IAAI,CAAC,wCAA0B,CAAC,CAAC,EA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AC;IAEnE,IAAI,CAAC,4BAAY,CAAC,CAAC,EAAE,CAAC,qCAAgB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC3D,kBAAkB,CAAC,yBAAS,EAAE,4BAAY,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAI,CAAC,uDAAyB,CAAC,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAEvE,IAAI,CAAC,wCAA0B,CAAC,CAAC,EAAE,CAAC,sDAA8B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACvF,IAAI,CAAC,iCAAmB,CAAC,CAAC,EAAE,CAAC,sDAA8B,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAChF,IAAI,CAAC,0DAA0B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC7D,IAAI,CAAC,oCAAgB,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,0DAA0B,CAAC,CAAC;AAC9E,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@theia/debug",
3
- "version": "1.58.2",
3
+ "version": "1.59.0-next.62+9e43c93ad",
4
4
  "description": "Theia - Debug Extension",
5
5
  "dependencies": {
6
- "@theia/console": "1.58.2",
7
- "@theia/core": "1.58.2",
8
- "@theia/editor": "1.58.2",
9
- "@theia/filesystem": "1.58.2",
10
- "@theia/markers": "1.58.2",
11
- "@theia/monaco": "1.58.2",
6
+ "@theia/console": "1.59.0-next.62+9e43c93ad",
7
+ "@theia/core": "1.59.0-next.62+9e43c93ad",
8
+ "@theia/editor": "1.59.0-next.62+9e43c93ad",
9
+ "@theia/filesystem": "1.59.0-next.62+9e43c93ad",
10
+ "@theia/markers": "1.59.0-next.62+9e43c93ad",
11
+ "@theia/monaco": "1.59.0-next.62+9e43c93ad",
12
12
  "@theia/monaco-editor-core": "1.96.302",
13
- "@theia/output": "1.58.2",
14
- "@theia/process": "1.58.2",
15
- "@theia/task": "1.58.2",
16
- "@theia/terminal": "1.58.2",
17
- "@theia/test": "1.58.2",
18
- "@theia/variable-resolver": "1.58.2",
19
- "@theia/workspace": "1.58.2",
13
+ "@theia/output": "1.59.0-next.62+9e43c93ad",
14
+ "@theia/process": "1.59.0-next.62+9e43c93ad",
15
+ "@theia/task": "1.59.0-next.62+9e43c93ad",
16
+ "@theia/terminal": "1.59.0-next.62+9e43c93ad",
17
+ "@theia/test": "1.59.0-next.62+9e43c93ad",
18
+ "@theia/variable-resolver": "1.59.0-next.62+9e43c93ad",
19
+ "@theia/workspace": "1.59.0-next.62+9e43c93ad",
20
20
  "@vscode/debugprotocol": "^1.51.0",
21
21
  "fast-deep-equal": "^3.1.3",
22
22
  "jsonc-parser": "^2.2.0",
@@ -59,10 +59,10 @@
59
59
  "watch": "theiaext watch"
60
60
  },
61
61
  "devDependencies": {
62
- "@theia/ext-scripts": "1.58.2"
62
+ "@theia/ext-scripts": "1.58.0"
63
63
  },
64
64
  "nyc": {
65
65
  "extends": "../../configs/nyc.json"
66
66
  },
67
- "gitHead": "4af367c0a63547aff14a27c98d929ee77a22aafe"
67
+ "gitHead": "9e43c93ad61ea977db3974207bac5d7c1fd3ccd6"
68
68
  }
@@ -28,6 +28,7 @@ import { SelectComponent, SelectOption } from '@theia/core/lib/browser/widgets/s
28
28
  import { DebugSession } from '../debug-session';
29
29
  import { DebugSessionManager, DidChangeActiveDebugSession } from '../debug-session-manager';
30
30
  import { DebugConsoleSession, DebugConsoleSessionFactory } from './debug-console-session';
31
+ import { InMemoryResources } from '@theia/core';
31
32
 
32
33
  export type InDebugReplContextKey = ContextKey<boolean>;
33
34
  export const InDebugReplContextKey = Symbol('inDebugReplContextKey');
@@ -56,6 +57,9 @@ export class DebugConsoleContribution extends AbstractViewContribution<ConsoleWi
56
57
  @inject(DebugSessionManager)
57
58
  protected debugSessionManager: DebugSessionManager;
58
59
 
60
+ @inject(InMemoryResources)
61
+ protected readonly resources: InMemoryResources;
62
+
59
63
  constructor() {
60
64
  super({
61
65
  widgetId: DebugConsoleContribution.options.id,
@@ -70,6 +74,7 @@ export class DebugConsoleContribution extends AbstractViewContribution<ConsoleWi
70
74
 
71
75
  @postConstruct()
72
76
  protected init(): void {
77
+ this.resources.add(DebugConsoleSession.uri, '');
73
78
  this.debugSessionManager.onDidCreateDebugSession(session => {
74
79
  const consoleParent = session.findConsoleParent();
75
80
  if (consoleParent) {
@@ -62,6 +62,7 @@ import { DebugSessionWidget } from './view/debug-session-widget';
62
62
  import { bindDisassemblyView } from './disassembly-view/disassembly-view-contribution';
63
63
  import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
64
64
  import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
65
+ import { DebugSessionConfigurationLabelProvider } from './debug-session-configuration-label-provider';
65
66
 
66
67
  export default new ContainerModule((bind: interfaces.Bind) => {
67
68
  bindContributionProvider(bind, DebugContribution);
@@ -130,4 +131,6 @@ export default new ContainerModule((bind: interfaces.Bind) => {
130
131
  }));
131
132
  }
132
133
  bindDisassemblyView(bind);
134
+
135
+ bind(DebugSessionConfigurationLabelProvider).toSelf().inSingletonScope();
133
136
  });
@@ -0,0 +1,98 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
18
+ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
19
+ const disableJSDOM = enableJSDOM();
20
+ FrontendApplicationConfigProvider.set({});
21
+
22
+ import { Container } from '@theia/core/shared/inversify';
23
+ import { type FileStat } from '@theia/filesystem/lib/common/files';
24
+ import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
25
+ import { expect } from 'chai';
26
+ import { DebugSessionConfigurationLabelProvider } from './debug-session-configuration-label-provider';
27
+
28
+ disableJSDOM();
29
+
30
+ describe('DebugSessionConfigurationLabelProvider', () => {
31
+
32
+ let roots: FileStat[] = [];
33
+ const tryGetRoots = () => roots;
34
+ let labelProvider: DebugSessionConfigurationLabelProvider;
35
+
36
+ before(() => {
37
+ const container = new Container();
38
+ container.bind(WorkspaceService).toConstantValue(<WorkspaceService>{
39
+ tryGetRoots
40
+ });
41
+ container.bind(DebugSessionConfigurationLabelProvider).toSelf();
42
+ labelProvider = container.get(DebugSessionConfigurationLabelProvider);
43
+ });
44
+
45
+ beforeEach(() => {
46
+ roots = [];
47
+ });
48
+
49
+ it('should return the name', () => {
50
+ const name = 'name';
51
+ const label = labelProvider.getLabel({ name });
52
+ expect(label).to.be.equal(name);
53
+ });
54
+
55
+ it('should return the name with default params', () => {
56
+ const name = 'name';
57
+ const label = labelProvider.getLabel({ name, workspaceFolderUri: 'file:///workspace/folder/basename' });
58
+ expect(label).to.be.equal(name);
59
+ });
60
+
61
+ it('should return the multi-root name ignoring the workspace', () => {
62
+ const name = 'name';
63
+ const label = labelProvider.getLabel({ name, workspaceFolderUri: 'file:///workspace/folder/basename' }, true);
64
+ expect(label).to.be.equal('name (basename)');
65
+ });
66
+
67
+ it('should ignore the workspace and return the name without default params', () => {
68
+ roots = [
69
+ {/* irrelevant */ } as FileStat,
70
+ {/* irrelevant */ } as FileStat,
71
+ ];
72
+
73
+ const name = 'name';
74
+ const label = labelProvider.getLabel({ name }, false);
75
+ expect(label).to.be.equal(name);
76
+ });
77
+
78
+ it('should handle multi-workspace roots', () => {
79
+ roots = [
80
+ {/* irrelevant */ } as FileStat,
81
+ {/* irrelevant */ } as FileStat,
82
+ ];
83
+
84
+ const name = 'name';
85
+ const label = labelProvider.getLabel({ name, workspaceFolderUri: 'file:///workspace/root1/folder/basename' });
86
+ expect(label).to.be.equal('name (basename)');
87
+ });
88
+
89
+ it('should handle falsy basename and URI authority wins with multi-workspace roots', () => {
90
+ roots = [
91
+ {/* irrelevant */ } as FileStat,
92
+ {/* irrelevant */ } as FileStat,
93
+ ];
94
+
95
+ const label = labelProvider.getLabel({ name: '', workspaceFolderUri: 'http://example.com' });
96
+ expect(label).to.be.equal(' (example.com)');
97
+ });
98
+ });
@@ -0,0 +1,46 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import URI from '@theia/core/lib/common/uri';
18
+ import { inject, injectable } from '@theia/core/shared/inversify';
19
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
20
+ import { type DebugSessionOptions } from './debug-session-options';
21
+
22
+ /**
23
+ * Provides a label for the debug session without the need to create the session.
24
+ * Debug session labels are used to check if sessions are the "same".
25
+ */
26
+ @injectable()
27
+ export class DebugSessionConfigurationLabelProvider {
28
+
29
+ @inject(WorkspaceService)
30
+ protected readonly workspaceService: WorkspaceService;
31
+
32
+ // https://github.com/microsoft/vscode/blob/907518a25c6d6b9467cbcc57132c6adb7e7396b0/src/vs/workbench/contrib/debug/browser/debugSession.ts#L253-L256
33
+ getLabel(
34
+ params: Pick<DebugSessionOptions, 'name' | 'workspaceFolderUri'>,
35
+ includeRoot = this.workspaceService.tryGetRoots().length > 1
36
+ ): string {
37
+ let { name, workspaceFolderUri } = params;
38
+ if (includeRoot && workspaceFolderUri) {
39
+ const uri = new URI(workspaceFolderUri);
40
+ const path = uri.path;
41
+ const basenameOrAuthority = path.name || uri.authority;
42
+ name += ` (${basenameOrAuthority})`;
43
+ }
44
+ return name;
45
+ }
46
+ }
@@ -15,7 +15,7 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { DisposableCollection, Emitter, Event, MessageService, nls, ProgressService, WaitUntilEvent } from '@theia/core';
18
- import { LabelProvider, ApplicationShell } from '@theia/core/lib/browser';
18
+ import { LabelProvider, ApplicationShell, ConfirmDialog } from '@theia/core/lib/browser';
19
19
  import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service';
20
20
  import URI from '@theia/core/lib/common/uri';
21
21
  import { EditorManager } from '@theia/editor/lib/browser';
@@ -37,6 +37,8 @@ import { DebugSourceBreakpoint } from './model/debug-source-breakpoint';
37
37
  import { DebugFunctionBreakpoint } from './model/debug-function-breakpoint';
38
38
  import * as monaco from '@theia/monaco-editor-core';
39
39
  import { DebugInstructionBreakpoint } from './model/debug-instruction-breakpoint';
40
+ import { DebugWidget } from './view/debug-widget';
41
+ import { DebugSessionConfigurationLabelProvider } from './debug-session-configuration-label-provider';
40
42
 
41
43
  export interface WillStartDebugSession extends WaitUntilEvent {
42
44
  }
@@ -152,6 +154,9 @@ export class DebugSessionManager {
152
154
  @inject(ApplicationShell)
153
155
  protected readonly shell: ApplicationShell;
154
156
 
157
+ @inject(DebugSessionConfigurationLabelProvider)
158
+ protected readonly sessionConfigurationLabelProvider: DebugSessionConfigurationLabelProvider;
159
+
155
160
  protected debugTypeKey: ContextKey<string>;
156
161
  protected inDebugModeKey: ContextKey<boolean>;
157
162
  protected debugStateKey: ContextKey<string>;
@@ -228,6 +233,20 @@ export class DebugSessionManager {
228
233
  return undefined;
229
234
  }
230
235
 
236
+ const sessionConfigurationLabel = this.sessionConfigurationLabelProvider.getLabel(resolved);
237
+ if (options?.startedByUser
238
+ && options.configuration.suppressMultipleSessionWarning !== true
239
+ && this.sessions.some(s => this.sessionConfigurationLabelProvider.getLabel(s.options) === sessionConfigurationLabel)
240
+ ) {
241
+ const yes = await new ConfirmDialog({
242
+ title: DebugWidget.LABEL,
243
+ msg: nls.localizeByDefault("'{0}' is already running. Do you want to start another instance?", sessionConfigurationLabel)
244
+ }).open();
245
+ if (!yes) {
246
+ return undefined;
247
+ }
248
+ }
249
+
231
250
  // preLaunchTask isn't run in case of auto restart as well as postDebugTask
232
251
  if (!options.configuration.__restart) {
233
252
  const taskRun = await this.runTask(options.workspaceFolderUri, resolved.configuration.preLaunchTask, true);
@@ -32,13 +32,14 @@ export class DebugCompoundRoot {
32
32
  }
33
33
 
34
34
  export interface TestRunReference {
35
- controllerId: string,
36
- runId: string
35
+ controllerId: string;
36
+ runId: string;
37
37
  }
38
38
 
39
39
  export interface DebugSessionOptionsBase {
40
- workspaceFolderUri?: string,
41
- testRun?: TestRunReference
40
+ workspaceFolderUri?: string;
41
+ testRun?: TestRunReference;
42
+ startedByUser?: boolean;
42
43
  }
43
44
 
44
45
  export interface DebugConfigurationSessionOptions extends DebugSessionOptionsBase {
@@ -46,7 +47,7 @@ export interface DebugConfigurationSessionOptions extends DebugSessionOptionsBas
46
47
  configuration: DebugConfiguration;
47
48
  compound?: never;
48
49
  compoundRoot?: DebugCompoundRoot;
49
- providerType?: string // Applicable to dynamic configurations
50
+ providerType?: string; // Applicable to dynamic configurations
50
51
  }
51
52
 
52
53
  export type DynamicDebugConfigurationSessionOptions = DebugConfigurationSessionOptions & { providerType: string };
@@ -55,7 +56,7 @@ export interface DebugCompoundSessionOptions extends DebugSessionOptionsBase {
55
56
  name: string; // derived from the compound
56
57
  configuration?: never;
57
58
  compound: DebugCompound;
58
- noDebug?: boolean,
59
+ noDebug?: boolean;
59
60
  }
60
61
 
61
62
  export type DebugSessionOptions = DebugConfigurationSessionOptions | DebugCompoundSessionOptions;
@@ -661,7 +661,7 @@ export class DebugSession implements CompositeTreeElement {
661
661
  }
662
662
  }
663
663
  }
664
- if (body.reason === 'removed' && raw.id) {
664
+ if (body.reason === 'removed' && typeof raw.id === 'number') {
665
665
  const toRemove = this.findBreakpoint(b => b.idFromAdapter === raw.id);
666
666
  if (toRemove) {
667
667
  toRemove.remove();
@@ -673,7 +673,7 @@ export class DebugSession implements CompositeTreeElement {
673
673
  }
674
674
  }
675
675
  }
676
- if (body.reason === 'changed' && raw.id) {
676
+ if (body.reason === 'changed' && typeof raw.id === 'number') {
677
677
  const toUpdate = this.findBreakpoint(b => b.idFromAdapter === raw.id);
678
678
  if (toUpdate) {
679
679
  toUpdate.update({ raw });
@@ -18,7 +18,7 @@ import * as React from '@theia/core/shared/react';
18
18
  import { createRoot, Root } from '@theia/core/shared/react-dom/client';
19
19
  import { DebugProtocol } from '@vscode/debugprotocol';
20
20
  import { injectable, postConstruct, inject } from '@theia/core/shared/inversify';
21
- import { Disposable, DisposableCollection, nls } from '@theia/core';
21
+ import { Disposable, DisposableCollection, InMemoryResources, nls } from '@theia/core';
22
22
  import URI from '@theia/core/lib/common/uri';
23
23
  import { MonacoEditorProvider } from '@theia/monaco/lib/browser/monaco-editor-provider';
24
24
  import { MonacoEditorZoneWidget } from '@theia/monaco/lib/browser/monaco-editor-zone-widget';
@@ -45,6 +45,8 @@ export type ShowDebugBreakpointOptions = DebugSourceBreakpoint | {
45
45
  context: DebugBreakpointWidget.Context
46
46
  };
47
47
 
48
+ export const BREAKPOINT_INPUT_SCHEME = 'breakpointinput';
49
+
48
50
  @injectable()
49
51
  export class DebugBreakpointWidget implements Disposable {
50
52
 
@@ -54,8 +56,12 @@ export class DebugBreakpointWidget implements Disposable {
54
56
  @inject(MonacoEditorProvider)
55
57
  protected readonly editorProvider: MonacoEditorProvider;
56
58
 
59
+ @inject(InMemoryResources)
60
+ protected readonly resources: InMemoryResources;
61
+
57
62
  protected selectNode: HTMLDivElement;
58
63
  protected selectNodeRoot: Root;
64
+ protected uri: URI;
59
65
 
60
66
  protected zone: MonacoEditorZoneWidget;
61
67
 
@@ -100,6 +106,8 @@ export class DebugBreakpointWidget implements Disposable {
100
106
  }
101
107
 
102
108
  protected async doInit(): Promise<void> {
109
+ this.uri = new URI().withScheme(BREAKPOINT_INPUT_SCHEME).withPath(this.editor.getControl().getId());
110
+ this.toDispose.push(this.resources.add(this.uri, ''));
103
111
  this.toDispose.push(this.zone = new MonacoEditorZoneWidget(this.editor.getControl()));
104
112
  this.zone.containerNode.classList.add('theia-debug-breakpoint-widget');
105
113
 
@@ -215,14 +223,16 @@ export class DebugBreakpointWidget implements Disposable {
215
223
  }
216
224
 
217
225
  protected createInput(node: HTMLElement): Promise<MonacoEditor> {
218
- return this.editorProvider.createInline(new URI().withScheme('breakpointinput').withPath(this.editor.getControl().getId()), node, {
226
+ return this.editorProvider.createInline(this.uri, node, {
219
227
  autoSizing: false
220
228
  });
221
229
  }
222
230
 
223
231
  protected render(): void {
232
+ const value = this._values[this.context] || '';
233
+ this.resources.update(this.uri, value);
224
234
  if (this._input) {
225
- this._input.getControl().setValue(this._values[this.context] || '');
235
+ this._input.getControl().setValue(value);
226
236
  }
227
237
  const selectComponent = this.selectComponentRef.current;
228
238
  if (selectComponent && selectComponent.value !== this.context) {
@@ -21,12 +21,14 @@ import { DebugSessionOptions } from '../debug-session-options';
21
21
  import { SelectComponent, SelectOption } from '@theia/core/lib/browser/widgets/select-component';
22
22
  import { QuickInputService } from '@theia/core/lib/browser';
23
23
  import { nls } from '@theia/core/lib/common/nls';
24
+ import { DebugSessionConfigurationLabelProvider } from '../debug-session-configuration-label-provider';
24
25
 
25
26
  interface DynamicPickItem { label: string, configurationType: string, request: string, providerType: string, workspaceFolderUri?: string }
26
27
 
27
28
  export interface DebugConfigurationSelectProps {
28
29
  manager: DebugConfigurationManager,
29
30
  quickInputService: QuickInputService,
31
+ labelProvider: DebugSessionConfigurationLabelProvider,
30
32
  isMultiRoot: boolean
31
33
  }
32
34
 
@@ -256,11 +258,7 @@ export class DebugConfigurationSelect extends React.Component<DebugConfiguration
256
258
  }
257
259
 
258
260
  protected toName(options: DebugSessionOptions, multiRoot: boolean): string {
259
- const name = options.configuration?.name ?? options.name;
260
- if (!options.workspaceFolderUri || !multiRoot) {
261
- return name;
262
- }
263
- return `${name} (${this.toBaseName(options.workspaceFolderUri)})`;
261
+ return this.props.labelProvider.getLabel(options, multiRoot);
264
262
  }
265
263
 
266
264
  protected toBaseName(uri: string | undefined): string {
@@ -27,6 +27,8 @@ import { DebugAction } from './debug-action';
27
27
  import { DebugConfigurationSelect } from './debug-configuration-select';
28
28
  import { DebugViewModel } from './debug-view-model';
29
29
  import { nls } from '@theia/core/lib/common/nls';
30
+ import { DebugSessionOptions } from '../debug-session-options';
31
+ import { DebugSessionConfigurationLabelProvider } from '../debug-session-configuration-label-provider';
30
32
 
31
33
  @injectable()
32
34
  export class DebugConfigurationWidget extends ReactWidget {
@@ -55,6 +57,9 @@ export class DebugConfigurationWidget extends ReactWidget {
55
57
  @inject(MessageService)
56
58
  protected readonly messageService: MessageService;
57
59
 
60
+ @inject(DebugSessionConfigurationLabelProvider)
61
+ protected readonly sessionConfigurationLabelProvider: DebugSessionConfigurationLabelProvider;
62
+
58
63
  protected readonly onRender = new DisposableCollection();
59
64
 
60
65
  @postConstruct()
@@ -94,6 +99,7 @@ export class DebugConfigurationWidget extends ReactWidget {
94
99
  manager={this.manager}
95
100
  quickInputService={this.quickInputService}
96
101
  isMultiRoot={this.workspaceService.isMultiRootWorkspaceOpened}
102
+ labelProvider={this.sessionConfigurationLabelProvider}
97
103
  />
98
104
  <DebugAction run={this.openConfiguration} label={nls.localizeByDefault('Open {0}', '"launch.json"')}
99
105
  iconClass='settings-gear' />
@@ -110,6 +116,10 @@ export class DebugConfigurationWidget extends ReactWidget {
110
116
  return;
111
117
  }
112
118
 
119
+ if (DebugSessionOptions.isConfiguration(configuration)) {
120
+ configuration.startedByUser = true;
121
+ }
122
+
113
123
  this.commandRegistry.executeCommand(DebugCommands.START.id, configuration);
114
124
  };
115
125
 
@@ -133,7 +133,7 @@ export class DebugToolBar extends ReactWidget {
133
133
  return <DebugAction enabled={state === DebugState.Running} run={this.pause} label={nls.localizeByDefault('Pause')} iconClass='debug-pause' />;
134
134
  }
135
135
 
136
- protected start = () => this.model.start();
136
+ protected start = () => this.model.start({ startedByUser: true });
137
137
  protected restart = () => this.model.restart();
138
138
  protected stop = () => this.model.terminate();
139
139
  protected continue = () => this.model.currentThread && this.model.currentThread.continue();
@@ -16,7 +16,7 @@
16
16
 
17
17
  import debounce from 'p-debounce';
18
18
  import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
19
- import { Disposable, DisposableCollection, Event, Emitter } from '@theia/core/lib/common';
19
+ import { Disposable, DisposableCollection, Event, Emitter, deepClone } from '@theia/core/lib/common';
20
20
  import URI from '@theia/core/lib/common/uri';
21
21
  import { DebugSession, DebugState } from '../debug-session';
22
22
  import { DebugSessionManager } from '../debug-session-manager';
@@ -27,6 +27,7 @@ import { DebugWatchExpression } from './debug-watch-expression';
27
27
  import { DebugWatchManager } from '../debug-watch-manager';
28
28
  import { DebugFunctionBreakpoint } from '../model/debug-function-breakpoint';
29
29
  import { DebugInstructionBreakpoint } from '../model/debug-instruction-breakpoint';
30
+ import { DebugSessionOptionsBase } from '../debug-session-options';
30
31
 
31
32
  @injectable()
32
33
  export class DebugViewModel implements Disposable {
@@ -136,12 +137,13 @@ export class DebugViewModel implements Disposable {
136
137
  return this.manager.getInstructionBreakpoints(this.currentSession);
137
138
  }
138
139
 
139
- async start(): Promise<void> {
140
+ async start(options: Partial<Pick<DebugSessionOptionsBase, 'startedByUser'>> = {}): Promise<void> {
140
141
  const { session } = this;
141
142
  if (!session) {
142
143
  return;
143
144
  }
144
- const newSession = await this.manager.start(session.options);
145
+ const optionsCopy = deepClone(session.options);
146
+ const newSession = await this.manager.start(Object.assign(optionsCopy, options));
145
147
  if (newSession) {
146
148
  this.fireDidChange();
147
149
  }
@@ -43,7 +43,6 @@ export class DebugAdapterSessionImpl implements DebugAdapterSession {
43
43
  this.debugAdapter.onMessageReceived((message: string) => this.send(message));
44
44
  this.debugAdapter.onClose(() => this.onDebugAdapterExit());
45
45
  this.debugAdapter.onError(error => this.onDebugAdapterError(error));
46
-
47
46
  }
48
47
 
49
48
  async start(channel: DebugChannel): Promise<void> {
@@ -84,6 +84,9 @@ export interface DebugConfiguration {
84
84
 
85
85
  /** When true, the debug viewlet will not be automatically revealed for this session. */
86
86
  suppressDebugView?: boolean;
87
+
88
+ /** Disable the warning when trying to start the same debug configuration more than once. */
89
+ suppressMultipleSessionWarning?: boolean;
87
90
  }
88
91
  export namespace DebugConfiguration {
89
92
  export function is(arg: unknown): arg is DebugConfiguration {
@@ -14,7 +14,7 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
 
17
- import { bindContributionProvider, ILogger } from '@theia/core/lib/common';
17
+ import { bindContributionProvider } from '@theia/core/lib/common';
18
18
  import { ContainerModule } from '@theia/core/shared/inversify';
19
19
  import {
20
20
  DebugPath,
@@ -50,8 +50,4 @@ export default new ContainerModule(bind => {
50
50
  bind(DebugAdapterFactory).to(LaunchBasedDebugAdapterFactory).inSingletonScope();
51
51
  bind(DebugAdapterSessionManager).toSelf().inSingletonScope();
52
52
  bind(MessagingService.Contribution).toService(DebugAdapterSessionManager);
53
-
54
- bind(ILogger).toDynamicValue(({ container }) =>
55
- container.get<ILogger>(ILogger).child('debug')
56
- ).inSingletonScope().whenTargetNamed('debug');
57
53
  });