@theia/debug 1.18.0 → 1.21.0-next.12

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 (168) hide show
  1. package/lib/browser/console/debug-console-contribution.d.ts +1 -0
  2. package/lib/browser/console/debug-console-contribution.d.ts.map +1 -1
  3. package/lib/browser/console/debug-console-contribution.js +8 -6
  4. package/lib/browser/console/debug-console-contribution.js.map +1 -1
  5. package/lib/browser/console/debug-console-session.d.ts +1 -1
  6. package/lib/browser/console/debug-console-session.js +2 -2
  7. package/lib/browser/console/debug-console-session.js.map +1 -1
  8. package/lib/browser/debug-configuration-manager.d.ts.map +1 -1
  9. package/lib/browser/debug-configuration-manager.js +8 -7
  10. package/lib/browser/debug-configuration-manager.js.map +1 -1
  11. package/lib/browser/debug-frontend-application-contribution.d.ts +5 -12
  12. package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
  13. package/lib/browser/debug-frontend-application-contribution.js +139 -112
  14. package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
  15. package/lib/browser/debug-preferences.d.ts +1 -0
  16. package/lib/browser/debug-preferences.d.ts.map +1 -1
  17. package/lib/browser/debug-preferences.js +22 -6
  18. package/lib/browser/debug-preferences.js.map +1 -1
  19. package/lib/browser/debug-prefix-configuration.d.ts.map +1 -1
  20. package/lib/browser/debug-prefix-configuration.js +3 -3
  21. package/lib/browser/debug-prefix-configuration.js.map +1 -1
  22. package/lib/browser/debug-session-connection.d.ts +23 -18
  23. package/lib/browser/debug-session-connection.d.ts.map +1 -1
  24. package/lib/browser/debug-session-connection.js +86 -65
  25. package/lib/browser/debug-session-connection.js.map +1 -1
  26. package/lib/browser/debug-session-contribution.d.ts +1 -1
  27. package/lib/browser/debug-session-contribution.d.ts.map +1 -1
  28. package/lib/browser/debug-session-contribution.js +1 -1
  29. package/lib/browser/debug-session-contribution.js.map +1 -1
  30. package/lib/browser/debug-session-manager.d.ts +6 -14
  31. package/lib/browser/debug-session-manager.d.ts.map +1 -1
  32. package/lib/browser/debug-session-manager.js +41 -44
  33. package/lib/browser/debug-session-manager.js.map +1 -1
  34. package/lib/browser/debug-session.d.ts +9 -8
  35. package/lib/browser/debug-session.d.ts.map +1 -1
  36. package/lib/browser/debug-session.js +55 -58
  37. package/lib/browser/debug-session.js.map +1 -1
  38. package/lib/browser/model/debug-function-breakpoint.d.ts.map +1 -1
  39. package/lib/browser/model/debug-function-breakpoint.js +4 -3
  40. package/lib/browser/model/debug-function-breakpoint.js.map +1 -1
  41. package/lib/browser/preferences/launch-preferences.d.ts.map +1 -1
  42. package/lib/browser/preferences/launch-preferences.js +2 -1
  43. package/lib/browser/preferences/launch-preferences.js.map +1 -1
  44. package/lib/browser/view/debug-breakpoints-source.d.ts +0 -1
  45. package/lib/browser/view/debug-breakpoints-source.d.ts.map +1 -1
  46. package/lib/browser/view/debug-breakpoints-source.js +1 -7
  47. package/lib/browser/view/debug-breakpoints-source.js.map +1 -1
  48. package/lib/browser/view/debug-breakpoints-widget.d.ts.map +1 -1
  49. package/lib/browser/view/debug-breakpoints-widget.js +2 -1
  50. package/lib/browser/view/debug-breakpoints-widget.js.map +1 -1
  51. package/lib/browser/view/debug-configuration-widget.d.ts +1 -1
  52. package/lib/browser/view/debug-configuration-widget.d.ts.map +1 -1
  53. package/lib/browser/view/debug-configuration-widget.js +8 -8
  54. package/lib/browser/view/debug-configuration-widget.js.map +1 -1
  55. package/lib/browser/view/debug-session-widget.d.ts +2 -1
  56. package/lib/browser/view/debug-session-widget.d.ts.map +1 -1
  57. package/lib/browser/view/debug-session-widget.js +12 -6
  58. package/lib/browser/view/debug-session-widget.js.map +1 -1
  59. package/lib/browser/view/debug-stack-frames-source.d.ts +0 -1
  60. package/lib/browser/view/debug-stack-frames-source.d.ts.map +1 -1
  61. package/lib/browser/view/debug-stack-frames-source.js +2 -5
  62. package/lib/browser/view/debug-stack-frames-source.js.map +1 -1
  63. package/lib/browser/view/debug-stack-frames-widget.d.ts.map +1 -1
  64. package/lib/browser/view/debug-stack-frames-widget.js +2 -1
  65. package/lib/browser/view/debug-stack-frames-widget.js.map +1 -1
  66. package/lib/browser/view/debug-threads-source.d.ts +0 -1
  67. package/lib/browser/view/debug-threads-source.d.ts.map +1 -1
  68. package/lib/browser/view/debug-threads-source.js +1 -7
  69. package/lib/browser/view/debug-threads-source.js.map +1 -1
  70. package/lib/browser/view/debug-threads-widget.d.ts.map +1 -1
  71. package/lib/browser/view/debug-threads-widget.js +2 -1
  72. package/lib/browser/view/debug-threads-widget.js.map +1 -1
  73. package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -1
  74. package/lib/browser/view/debug-toolbar-widget.js +9 -8
  75. package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
  76. package/lib/browser/view/debug-variables-source.d.ts +0 -1
  77. package/lib/browser/view/debug-variables-source.d.ts.map +1 -1
  78. package/lib/browser/view/debug-variables-source.js +2 -5
  79. package/lib/browser/view/debug-variables-source.js.map +1 -1
  80. package/lib/browser/view/debug-variables-widget.d.ts.map +1 -1
  81. package/lib/browser/view/debug-variables-widget.js +2 -1
  82. package/lib/browser/view/debug-variables-widget.js.map +1 -1
  83. package/lib/browser/view/debug-view-model.js +3 -3
  84. package/lib/browser/view/debug-view-model.js.map +1 -1
  85. package/lib/browser/view/debug-watch-source.d.ts +0 -1
  86. package/lib/browser/view/debug-watch-source.d.ts.map +1 -1
  87. package/lib/browser/view/debug-watch-source.js +2 -5
  88. package/lib/browser/view/debug-watch-source.js.map +1 -1
  89. package/lib/browser/view/debug-watch-widget.d.ts.map +1 -1
  90. package/lib/browser/view/debug-watch-widget.js +2 -1
  91. package/lib/browser/view/debug-watch-widget.js.map +1 -1
  92. package/lib/browser/view/debug-widget.d.ts.map +1 -1
  93. package/lib/browser/view/debug-widget.js +2 -1
  94. package/lib/browser/view/debug-widget.js.map +1 -1
  95. package/lib/common/debug-service.d.ts +10 -0
  96. package/lib/common/debug-service.d.ts.map +1 -1
  97. package/lib/node/debug-adapter-contribution-registry.d.ts +1 -1
  98. package/lib/node/debug-adapter-contribution-registry.d.ts.map +1 -1
  99. package/lib/node/debug-adapter-contribution-registry.js +1 -1
  100. package/lib/node/debug-adapter-contribution-registry.js.map +1 -1
  101. package/lib/node/debug-adapter-factory.d.ts +4 -4
  102. package/lib/node/debug-adapter-factory.d.ts.map +1 -1
  103. package/lib/node/debug-adapter-factory.js +10 -12
  104. package/lib/node/debug-adapter-factory.js.map +1 -1
  105. package/lib/node/debug-adapter-session-manager.d.ts +1 -1
  106. package/lib/node/debug-adapter-session-manager.d.ts.map +1 -1
  107. package/lib/node/debug-adapter-session-manager.js +1 -2
  108. package/lib/node/debug-adapter-session-manager.js.map +1 -1
  109. package/lib/node/debug-adapter-session.d.ts +7 -13
  110. package/lib/node/debug-adapter-session.d.ts.map +1 -1
  111. package/lib/node/debug-adapter-session.js +25 -68
  112. package/lib/node/debug-adapter-session.js.map +1 -1
  113. package/lib/node/debug-backend-module.js +1 -1
  114. package/lib/node/debug-backend-module.js.map +1 -1
  115. package/lib/{common → node}/debug-model.d.ts +37 -19
  116. package/lib/node/debug-model.d.ts.map +1 -0
  117. package/lib/{common → node}/debug-model.js +0 -0
  118. package/lib/node/debug-model.js.map +1 -0
  119. package/lib/node/inline-debug-adapter.d.ts +34 -0
  120. package/lib/node/inline-debug-adapter.d.ts.map +1 -0
  121. package/lib/node/inline-debug-adapter.js +45 -0
  122. package/lib/node/inline-debug-adapter.js.map +1 -0
  123. package/lib/node/stream-debug-adapter.d.ts +52 -0
  124. package/lib/node/stream-debug-adapter.d.ts.map +1 -0
  125. package/lib/node/stream-debug-adapter.js +113 -0
  126. package/lib/node/stream-debug-adapter.js.map +1 -0
  127. package/lib/node/vscode/vscode-debug-adapter-contribution.d.ts +1 -1
  128. package/lib/node/vscode/vscode-debug-adapter-contribution.d.ts.map +1 -1
  129. package/package.json +17 -17
  130. package/src/browser/console/debug-console-contribution.tsx +9 -6
  131. package/src/browser/console/debug-console-session.ts +2 -2
  132. package/src/browser/debug-configuration-manager.ts +10 -8
  133. package/src/browser/debug-frontend-application-contribution.ts +160 -125
  134. package/src/browser/debug-preferences.ts +23 -6
  135. package/src/browser/debug-prefix-configuration.ts +4 -4
  136. package/src/browser/debug-session-connection.ts +102 -76
  137. package/src/browser/debug-session-contribution.ts +3 -4
  138. package/src/browser/debug-session-manager.ts +45 -47
  139. package/src/browser/debug-session.tsx +54 -57
  140. package/src/browser/model/debug-function-breakpoint.tsx +4 -3
  141. package/src/browser/preferences/launch-preferences.ts +2 -1
  142. package/src/browser/view/debug-breakpoints-source.tsx +0 -6
  143. package/src/browser/view/debug-breakpoints-widget.ts +2 -1
  144. package/src/browser/view/debug-configuration-widget.tsx +8 -7
  145. package/src/browser/view/debug-session-widget.ts +12 -6
  146. package/src/browser/view/debug-stack-frames-source.tsx +0 -6
  147. package/src/browser/view/debug-stack-frames-widget.ts +2 -1
  148. package/src/browser/view/debug-threads-source.tsx +0 -6
  149. package/src/browser/view/debug-threads-widget.ts +2 -1
  150. package/src/browser/view/debug-toolbar-widget.tsx +13 -8
  151. package/src/browser/view/debug-variables-source.ts +0 -6
  152. package/src/browser/view/debug-variables-widget.ts +2 -1
  153. package/src/browser/view/debug-view-model.ts +3 -3
  154. package/src/browser/view/debug-watch-source.ts +0 -6
  155. package/src/browser/view/debug-watch-widget.ts +2 -1
  156. package/src/browser/view/debug-widget.ts +2 -1
  157. package/src/common/debug-service.ts +13 -0
  158. package/src/node/debug-adapter-contribution-registry.ts +1 -1
  159. package/src/node/debug-adapter-factory.ts +17 -17
  160. package/src/node/debug-adapter-session-manager.ts +1 -2
  161. package/src/node/debug-adapter-session.ts +32 -80
  162. package/src/node/debug-backend-module.ts +1 -1
  163. package/src/{common → node}/debug-model.ts +38 -18
  164. package/src/node/inline-debug-adapter.ts +47 -0
  165. package/src/node/stream-debug-adapter.ts +126 -0
  166. package/src/node/vscode/vscode-debug-adapter-contribution.ts +1 -1
  167. package/lib/common/debug-model.d.ts.map +0 -1
  168. package/lib/common/debug-model.js.map +0 -1
@@ -57,6 +57,7 @@ const debug_watch_expression_1 = require("./view/debug-watch-expression");
57
57
  const debug_watch_manager_1 = require("./debug-watch-manager");
58
58
  const debug_function_breakpoint_1 = require("./model/debug-function-breakpoint");
59
59
  const debug_breakpoint_1 = require("./model/debug-breakpoint");
60
+ const nls_1 = require("@theia/core/lib/common/nls");
60
61
  var DebugMenus;
61
62
  (function (DebugMenus) {
62
63
  DebugMenus.DEBUG = [...common_1.MAIN_MENU_BAR, '6_debug'];
@@ -68,207 +69,228 @@ var DebugMenus;
68
69
  DebugMenus.DEBUG_NEW_BREAKPOINT = [...DebugMenus.DEBUG_BREAKPOINT, 'a_new_breakpoint'];
69
70
  DebugMenus.DEBUG_BREAKPOINTS = [...DebugMenus.DEBUG, 'f_breakpoints'];
70
71
  })(DebugMenus = exports.DebugMenus || (exports.DebugMenus = {}));
72
+ function nlsEditBreakpoint(breakpointKey, breakpoint) {
73
+ return nls_1.nls.localizeByDefault('Edit {0}...', nls_1.nls.localize(`vscode/breakpointEditorContribution/${breakpointKey}`, breakpoint));
74
+ }
75
+ function nlsRemoveBreakpoint(breakpointKey, breakpoint) {
76
+ return nls_1.nls.localizeByDefault('Remove {0}', nls_1.nls.localize(`vscode/breakpointEditorContribution/${breakpointKey}`, breakpoint));
77
+ }
78
+ function nlsEnableBreakpoint(breakpointKey, breakpoint) {
79
+ return nls_1.nls.localizeByDefault('Enable {0}', nls_1.nls.localize(`vscode/breakpointEditorContribution/${breakpointKey}`, breakpoint));
80
+ }
81
+ function nlsDisableBreakpoint(breakpointKey, breakpoint) {
82
+ return nls_1.nls.localizeByDefault('Disable {0}', nls_1.nls.localize(`vscode/breakpointEditorContribution/${breakpointKey}`, breakpoint));
83
+ }
71
84
  var DebugCommands;
72
85
  (function (DebugCommands) {
73
86
  DebugCommands.DEBUG_CATEGORY = 'Debug';
74
- DebugCommands.START = {
87
+ DebugCommands.DEBUG_CATEGORY_KEY = nls_1.nls.getDefaultKey(DebugCommands.DEBUG_CATEGORY);
88
+ DebugCommands.START = common_1.Command.toDefaultLocalizedCommand({
75
89
  id: 'workbench.action.debug.start',
76
90
  category: DebugCommands.DEBUG_CATEGORY,
77
91
  label: 'Start Debugging',
78
92
  iconClass: browser_1.codicon('debug-alt')
79
- };
80
- DebugCommands.START_NO_DEBUG = {
93
+ });
94
+ DebugCommands.START_NO_DEBUG = common_1.Command.toDefaultLocalizedCommand({
81
95
  id: 'workbench.action.debug.run',
82
- label: 'Debug: Start Without Debugging'
83
- };
84
- DebugCommands.STOP = {
96
+ category: DebugCommands.DEBUG_CATEGORY,
97
+ label: 'Start Without Debugging'
98
+ });
99
+ DebugCommands.STOP = common_1.Command.toDefaultLocalizedCommand({
85
100
  id: 'workbench.action.debug.stop',
86
101
  category: DebugCommands.DEBUG_CATEGORY,
87
- label: 'Stop Debugging',
102
+ label: 'Stop',
88
103
  iconClass: browser_1.codicon('debug-stop')
89
- };
90
- DebugCommands.RESTART = {
104
+ });
105
+ DebugCommands.RESTART = common_1.Command.toDefaultLocalizedCommand({
91
106
  id: 'workbench.action.debug.restart',
92
107
  category: DebugCommands.DEBUG_CATEGORY,
93
- label: 'Restart Debugging',
94
- };
95
- DebugCommands.OPEN_CONFIGURATIONS = {
108
+ label: 'Restart',
109
+ });
110
+ DebugCommands.OPEN_CONFIGURATIONS = common_1.Command.toDefaultLocalizedCommand({
96
111
  id: 'debug.configurations.open',
97
- label: 'Debug: Open Configurations'
98
- };
99
- DebugCommands.ADD_CONFIGURATION = {
112
+ category: DebugCommands.DEBUG_CATEGORY,
113
+ label: 'Open Configurations'
114
+ });
115
+ DebugCommands.ADD_CONFIGURATION = common_1.Command.toDefaultLocalizedCommand({
100
116
  id: 'debug.configurations.add',
101
- label: 'Debug: Add Configuration...'
102
- };
103
- DebugCommands.STEP_OVER = {
117
+ category: DebugCommands.DEBUG_CATEGORY,
118
+ label: 'Add Configuration...'
119
+ });
120
+ DebugCommands.STEP_OVER = common_1.Command.toDefaultLocalizedCommand({
104
121
  id: 'workbench.action.debug.stepOver',
105
122
  category: DebugCommands.DEBUG_CATEGORY,
106
123
  label: 'Step Over',
107
124
  iconClass: browser_1.codicon('debug-step-over')
108
- };
109
- DebugCommands.STEP_INTO = {
125
+ });
126
+ DebugCommands.STEP_INTO = common_1.Command.toDefaultLocalizedCommand({
110
127
  id: 'workbench.action.debug.stepInto',
111
128
  category: DebugCommands.DEBUG_CATEGORY,
112
129
  label: 'Step Into',
113
130
  iconClass: browser_1.codicon('debug-step-into')
114
- };
115
- DebugCommands.STEP_OUT = {
131
+ });
132
+ DebugCommands.STEP_OUT = common_1.Command.toDefaultLocalizedCommand({
116
133
  id: 'workbench.action.debug.stepOut',
117
134
  category: DebugCommands.DEBUG_CATEGORY,
118
135
  label: 'Step Out',
119
136
  iconClass: browser_1.codicon('debug-step-out')
120
- };
121
- DebugCommands.CONTINUE = {
137
+ });
138
+ DebugCommands.CONTINUE = common_1.Command.toDefaultLocalizedCommand({
122
139
  id: 'workbench.action.debug.continue',
123
140
  category: DebugCommands.DEBUG_CATEGORY,
124
141
  label: 'Continue',
125
142
  iconClass: browser_1.codicon('debug-continue')
126
- };
127
- DebugCommands.PAUSE = {
143
+ });
144
+ DebugCommands.PAUSE = common_1.Command.toDefaultLocalizedCommand({
128
145
  id: 'workbench.action.debug.pause',
129
146
  category: DebugCommands.DEBUG_CATEGORY,
130
147
  label: 'Pause',
131
148
  iconClass: browser_1.codicon('debug-pause')
132
- };
133
- DebugCommands.CONTINUE_ALL = {
149
+ });
150
+ DebugCommands.CONTINUE_ALL = common_1.Command.toLocalizedCommand({
134
151
  id: 'debug.thread.continue.all',
135
152
  category: DebugCommands.DEBUG_CATEGORY,
136
153
  label: 'Continue All',
137
154
  iconClass: browser_1.codicon('debug-continue')
138
- };
139
- DebugCommands.PAUSE_ALL = {
155
+ }, 'theia/debug/continueAll', DebugCommands.DEBUG_CATEGORY_KEY);
156
+ DebugCommands.PAUSE_ALL = common_1.Command.toLocalizedCommand({
140
157
  id: 'debug.thread.pause.all',
141
158
  category: DebugCommands.DEBUG_CATEGORY,
142
159
  label: 'Pause All',
143
160
  iconClass: browser_1.codicon('debug-pause')
144
- };
145
- DebugCommands.TOGGLE_BREAKPOINT = {
161
+ }, 'theia/debug/pauseAll', DebugCommands.DEBUG_CATEGORY_KEY);
162
+ DebugCommands.TOGGLE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
146
163
  id: 'editor.debug.action.toggleBreakpoint',
147
164
  category: DebugCommands.DEBUG_CATEGORY,
148
165
  label: 'Toggle Breakpoint',
149
- };
150
- DebugCommands.INLINE_BREAKPOINT = {
166
+ });
167
+ DebugCommands.INLINE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
151
168
  id: 'editor.debug.action.inlineBreakpoint',
152
169
  category: DebugCommands.DEBUG_CATEGORY,
153
170
  label: 'Inline Breakpoint',
154
- };
155
- DebugCommands.ADD_CONDITIONAL_BREAKPOINT = {
171
+ });
172
+ DebugCommands.ADD_CONDITIONAL_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
156
173
  id: 'debug.breakpoint.add.conditional',
157
174
  category: DebugCommands.DEBUG_CATEGORY,
158
175
  label: 'Add Conditional Breakpoint...',
159
- };
160
- DebugCommands.ADD_LOGPOINT = {
176
+ });
177
+ DebugCommands.ADD_LOGPOINT = common_1.Command.toDefaultLocalizedCommand({
161
178
  id: 'debug.breakpoint.add.logpoint',
162
179
  category: DebugCommands.DEBUG_CATEGORY,
163
180
  label: 'Add Logpoint...',
164
- };
165
- DebugCommands.ADD_FUNCTION_BREAKPOINT = {
181
+ });
182
+ DebugCommands.ADD_FUNCTION_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
166
183
  id: 'debug.breakpoint.add.function',
167
184
  category: DebugCommands.DEBUG_CATEGORY,
168
- label: 'Add Function Breakpoint...',
169
- };
170
- DebugCommands.ENABLE_ALL_BREAKPOINTS = {
185
+ label: 'Add Function Breakpoint',
186
+ });
187
+ DebugCommands.ENABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
171
188
  id: 'debug.breakpoint.enableAll',
172
189
  category: DebugCommands.DEBUG_CATEGORY,
173
190
  label: 'Enable All Breakpoints',
174
- };
175
- DebugCommands.DISABLE_ALL_BREAKPOINTS = {
191
+ });
192
+ DebugCommands.DISABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
176
193
  id: 'debug.breakpoint.disableAll',
177
194
  category: DebugCommands.DEBUG_CATEGORY,
178
195
  label: 'Disable All Breakpoints',
179
- };
180
- DebugCommands.EDIT_BREAKPOINT = {
196
+ });
197
+ DebugCommands.EDIT_BREAKPOINT = common_1.Command.toLocalizedCommand({
181
198
  id: 'debug.breakpoint.edit',
182
199
  category: DebugCommands.DEBUG_CATEGORY,
183
- label: 'Edit Breakpoint...',
184
- };
185
- DebugCommands.EDIT_LOGPOINT = {
200
+ originalLabel: 'Edit Breakpoint...',
201
+ label: nlsEditBreakpoint('breakpoint', 'Breakpoint')
202
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
203
+ DebugCommands.EDIT_LOGPOINT = common_1.Command.toLocalizedCommand({
186
204
  id: 'debug.logpoint.edit',
187
205
  category: DebugCommands.DEBUG_CATEGORY,
188
- label: 'Edit Logpoint...',
189
- };
190
- DebugCommands.REMOVE_BREAKPOINT = {
206
+ originalLabel: 'Edit Logpoint...',
207
+ label: nlsEditBreakpoint('logPoint', 'Logpoint')
208
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
209
+ DebugCommands.REMOVE_BREAKPOINT = common_1.Command.toLocalizedCommand({
191
210
  id: 'debug.breakpoint.remove',
192
211
  category: DebugCommands.DEBUG_CATEGORY,
193
- label: 'Remove Breakpoint',
194
- };
195
- DebugCommands.REMOVE_LOGPOINT = {
212
+ originalLabel: 'Remove Breakpoint',
213
+ label: nlsRemoveBreakpoint('breakpoint', 'Breakpoint')
214
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
215
+ DebugCommands.REMOVE_LOGPOINT = common_1.Command.toLocalizedCommand({
196
216
  id: 'debug.logpoint.remove',
197
217
  category: DebugCommands.DEBUG_CATEGORY,
198
- label: 'Remove Logpoint',
199
- };
200
- DebugCommands.REMOVE_ALL_BREAKPOINTS = {
218
+ originalLabel: 'Remove Logpoint',
219
+ label: nlsRemoveBreakpoint('logPoint', 'Logpoint')
220
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
221
+ DebugCommands.REMOVE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
201
222
  id: 'debug.breakpoint.removeAll',
202
223
  category: DebugCommands.DEBUG_CATEGORY,
203
224
  label: 'Remove All Breakpoints',
204
- };
205
- DebugCommands.TOGGLE_BREAKPOINTS_ENABLED = {
225
+ });
226
+ DebugCommands.TOGGLE_BREAKPOINTS_ENABLED = common_1.Command.toLocalizedCommand({
206
227
  id: 'debug.breakpoint.toggleEnabled'
207
- };
208
- DebugCommands.SHOW_HOVER = {
228
+ });
229
+ DebugCommands.SHOW_HOVER = common_1.Command.toDefaultLocalizedCommand({
209
230
  id: 'editor.debug.action.showDebugHover',
210
- label: 'Debug: Show Hover'
211
- };
212
- DebugCommands.RESTART_FRAME = {
231
+ category: DebugCommands.DEBUG_CATEGORY,
232
+ label: 'Show Hover'
233
+ });
234
+ DebugCommands.RESTART_FRAME = common_1.Command.toDefaultLocalizedCommand({
213
235
  id: 'debug.frame.restart',
214
236
  category: DebugCommands.DEBUG_CATEGORY,
215
237
  label: 'Restart Frame',
216
- };
217
- DebugCommands.COPY_CALL_STACK = {
238
+ });
239
+ DebugCommands.COPY_CALL_STACK = common_1.Command.toDefaultLocalizedCommand({
218
240
  id: 'debug.callStack.copy',
219
241
  category: DebugCommands.DEBUG_CATEGORY,
220
242
  label: 'Copy Call Stack',
221
- };
222
- DebugCommands.SET_VARIABLE_VALUE = {
243
+ });
244
+ DebugCommands.SET_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
223
245
  id: 'debug.variable.setValue',
224
246
  category: DebugCommands.DEBUG_CATEGORY,
225
247
  label: 'Set Value',
226
- };
227
- DebugCommands.COPY_VARIABLE_VALUE = {
248
+ });
249
+ DebugCommands.COPY_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
228
250
  id: 'debug.variable.copyValue',
229
251
  category: DebugCommands.DEBUG_CATEGORY,
230
252
  label: 'Copy Value',
231
- };
232
- DebugCommands.COPY_VARIABLE_AS_EXPRESSION = {
253
+ });
254
+ DebugCommands.COPY_VARIABLE_AS_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
233
255
  id: 'debug.variable.copyAsExpression',
234
256
  category: DebugCommands.DEBUG_CATEGORY,
235
- label: 'Copy As Expression',
236
- };
237
- DebugCommands.WATCH_VARIABLE = {
257
+ label: 'Copy as Expression',
258
+ });
259
+ DebugCommands.WATCH_VARIABLE = common_1.Command.toDefaultLocalizedCommand({
238
260
  id: 'debug.variable.watch',
239
261
  category: DebugCommands.DEBUG_CATEGORY,
240
262
  label: 'Add to Watch',
241
- };
242
- DebugCommands.ADD_WATCH_EXPRESSION = {
263
+ });
264
+ DebugCommands.ADD_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
243
265
  id: 'debug.watch.addExpression',
244
266
  category: DebugCommands.DEBUG_CATEGORY,
245
- label: 'Add Watch Expression'
246
- };
247
- DebugCommands.EDIT_WATCH_EXPRESSION = {
267
+ label: 'Add Expression'
268
+ });
269
+ DebugCommands.EDIT_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
248
270
  id: 'debug.watch.editExpression',
249
271
  category: DebugCommands.DEBUG_CATEGORY,
250
- label: 'Edit Watch Expression'
251
- };
252
- DebugCommands.COPY_WATCH_EXPRESSION_VALUE = {
272
+ label: 'Edit Expression'
273
+ });
274
+ DebugCommands.COPY_WATCH_EXPRESSION_VALUE = common_1.Command.toLocalizedCommand({
253
275
  id: 'debug.watch.copyExpressionValue',
254
276
  category: DebugCommands.DEBUG_CATEGORY,
255
- label: 'Copy Watch Expression Value'
256
- };
257
- DebugCommands.REMOVE_WATCH_EXPRESSION = {
277
+ label: 'Copy Expression Value'
278
+ }, 'theia/debug/copyExpressionValue', DebugCommands.DEBUG_CATEGORY_KEY);
279
+ DebugCommands.REMOVE_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
258
280
  id: 'debug.watch.removeExpression',
259
281
  category: DebugCommands.DEBUG_CATEGORY,
260
- label: 'Remove Watch Expression'
261
- };
262
- DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS = {
282
+ label: 'Remove Expression'
283
+ });
284
+ DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
263
285
  id: 'debug.watch.collapseAllExpressions',
264
286
  category: DebugCommands.DEBUG_CATEGORY,
265
- label: 'Collapse All Watch Expressions'
266
- };
267
- DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS = {
287
+ label: 'Collapse All'
288
+ });
289
+ DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
268
290
  id: 'debug.watch.removeAllExpressions',
269
291
  category: DebugCommands.DEBUG_CATEGORY,
270
- label: 'Remove All Watch Expressions'
271
- };
292
+ label: 'Remove All Expressions'
293
+ });
272
294
  })(DebugCommands = exports.DebugCommands || (exports.DebugCommands = {}));
273
295
  var DebugThreadContextCommands;
274
296
  (function (DebugThreadContextCommands) {
@@ -432,6 +454,9 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
432
454
  this.breakpointManager.save();
433
455
  this.watchManager.save();
434
456
  }
457
+ onWillStop() {
458
+ return this.preference['debug.confirmOnExit'] === 'always' && !!this.manager.currentSession;
459
+ }
435
460
  registerMenus(menus) {
436
461
  super.registerMenus(menus);
437
462
  const registerMenuActions = (menuPath, ...commands) => {
@@ -446,27 +471,27 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
446
471
  });
447
472
  }
448
473
  };
449
- menus.registerSubmenu(DebugMenus.DEBUG, 'Run');
474
+ menus.registerSubmenu(DebugMenus.DEBUG, nls_1.nls.localizeByDefault('Run'));
450
475
  registerMenuActions(DebugMenus.DEBUG_CONTROLS, DebugCommands.START, DebugCommands.START_NO_DEBUG, DebugCommands.STOP, DebugCommands.RESTART);
451
476
  registerMenuActions(DebugMenus.DEBUG_CONFIGURATION, DebugCommands.OPEN_CONFIGURATIONS, DebugCommands.ADD_CONFIGURATION);
452
477
  registerMenuActions(DebugMenus.DEBUG_THREADS, DebugCommands.CONTINUE, DebugCommands.STEP_OVER, DebugCommands.STEP_INTO, DebugCommands.STEP_OUT, DebugCommands.PAUSE);
453
478
  registerMenuActions(DebugMenus.DEBUG_SESSIONS, DebugCommands.CONTINUE_ALL, DebugCommands.PAUSE_ALL);
454
479
  registerMenuActions(DebugMenus.DEBUG_BREAKPOINT, DebugCommands.TOGGLE_BREAKPOINT);
455
- menus.registerSubmenu(DebugMenus.DEBUG_NEW_BREAKPOINT, 'New Breakpoint');
480
+ menus.registerSubmenu(DebugMenus.DEBUG_NEW_BREAKPOINT, nls_1.nls.localizeByDefault('New Breakpoint'));
456
481
  registerMenuActions(DebugMenus.DEBUG_NEW_BREAKPOINT, DebugCommands.ADD_CONDITIONAL_BREAKPOINT, DebugCommands.INLINE_BREAKPOINT, DebugCommands.ADD_FUNCTION_BREAKPOINT, DebugCommands.ADD_LOGPOINT);
457
482
  registerMenuActions(DebugMenus.DEBUG_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
458
483
  registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.CONTROL_MENU, Object.assign(Object.assign({}, DebugCommands.PAUSE), DebugThreadContextCommands.PAUSE), Object.assign(Object.assign({}, DebugCommands.CONTINUE), DebugThreadContextCommands.CONTINUE), Object.assign(Object.assign({}, DebugCommands.STEP_OVER), DebugThreadContextCommands.STEP_OVER), Object.assign(Object.assign({}, DebugCommands.STEP_INTO), DebugThreadContextCommands.STEP_INTO), Object.assign(Object.assign({}, DebugCommands.STEP_OUT), DebugThreadContextCommands.STEP_OUT), Object.assign(Object.assign({}, DebugCommands.PAUSE_ALL), DebugSessionContextCommands.PAUSE_ALL), Object.assign(Object.assign({}, DebugCommands.CONTINUE_ALL), DebugSessionContextCommands.CONTINUE_ALL));
459
- registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, Object.assign(Object.assign(Object.assign({}, DebugCommands.RESTART), DebugSessionContextCommands.RESTART), { label: 'Restart' }), Object.assign(Object.assign(Object.assign({}, DebugCommands.STOP), DebugSessionContextCommands.STOP), { label: 'Stop' }), Object.assign(Object.assign({}, DebugThreadContextCommands.TERMINATE), { label: 'Terminate Thread' }));
460
- registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, Object.assign(Object.assign({}, DebugSessionContextCommands.REVEAL), { label: 'Reveal' }), Object.assign(Object.assign({}, DebugSessionContextCommands.OPEN_LEFT), { label: 'Open Left' }), Object.assign(Object.assign({}, DebugSessionContextCommands.OPEN_RIGHT), { label: 'Open Right' }), Object.assign(Object.assign({}, DebugSessionContextCommands.OPEN_BOTTOM), { label: 'Open Bottom' }));
484
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, Object.assign(Object.assign({}, DebugCommands.RESTART), DebugSessionContextCommands.RESTART), Object.assign(Object.assign({}, DebugCommands.STOP), DebugSessionContextCommands.STOP), Object.assign(Object.assign({}, DebugThreadContextCommands.TERMINATE), { label: nls_1.nls.localizeByDefault('Terminate Thread') }));
485
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, Object.assign(Object.assign({}, DebugSessionContextCommands.REVEAL), { label: nls_1.nls.localize('theia/debug/reveal', 'Reveal') }), Object.assign(Object.assign({}, DebugSessionContextCommands.OPEN_LEFT), { label: nls_1.nls.localize('theia/debug/openLeft', 'Open Left') }), Object.assign(Object.assign({}, DebugSessionContextCommands.OPEN_RIGHT), { label: nls_1.nls.localize('theia/debug/openRight', 'Open Right') }), Object.assign(Object.assign({}, DebugSessionContextCommands.OPEN_BOTTOM), { label: nls_1.nls.localize('theia/debug/openBottom', 'Open Bottom') }));
461
486
  registerMenuActions(debug_stack_frames_widget_1.DebugStackFramesWidget.CONTEXT_MENU, DebugCommands.RESTART_FRAME, DebugCommands.COPY_CALL_STACK);
462
487
  registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.EDIT_MENU, DebugCommands.SET_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
463
488
  registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
464
- registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, Object.assign(Object.assign({}, DebugCommands.EDIT_WATCH_EXPRESSION), { label: 'Edit Expression' }), Object.assign(Object.assign({}, DebugCommands.COPY_WATCH_EXPRESSION_VALUE), { label: 'Copy Value' }));
465
- registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, Object.assign(Object.assign({}, DebugCommands.REMOVE_WATCH_EXPRESSION), { label: 'Remove Expression' }), Object.assign(Object.assign({}, DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS), { label: 'Remove All Expressions' }));
489
+ registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, DebugCommands.EDIT_WATCH_EXPRESSION, DebugCommands.COPY_WATCH_EXPRESSION_VALUE);
490
+ registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, DebugCommands.REMOVE_WATCH_EXPRESSION, DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS);
466
491
  registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.EDIT_MENU, DebugCommands.EDIT_BREAKPOINT, DebugCommands.EDIT_LOGPOINT);
467
492
  registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.REMOVE_MENU, DebugCommands.REMOVE_BREAKPOINT, DebugCommands.REMOVE_LOGPOINT, DebugCommands.REMOVE_ALL_BREAKPOINTS);
468
493
  registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.ENABLE_MENU, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS);
469
- registerMenuActions(debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, Object.assign(Object.assign({}, DebugEditorContextCommands.ADD_BREAKPOINT), { label: 'Add Breakpoint' }), Object.assign(Object.assign({}, DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT), { label: DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.ADD_LOGPOINT), { label: DebugCommands.ADD_LOGPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.REMOVE_BREAKPOINT), { label: DebugCommands.REMOVE_BREAKPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.EDIT_BREAKPOINT), { label: DebugCommands.EDIT_BREAKPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.ENABLE_BREAKPOINT), { label: 'Enable Breakpoint' }), Object.assign(Object.assign({}, DebugEditorContextCommands.DISABLE_BREAKPOINT), { label: 'Disable Breakpoint' }), Object.assign(Object.assign({}, DebugEditorContextCommands.REMOVE_LOGPOINT), { label: DebugCommands.REMOVE_LOGPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.EDIT_LOGPOINT), { label: DebugCommands.EDIT_LOGPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.ENABLE_LOGPOINT), { label: 'Enable Logpoint' }), Object.assign(Object.assign({}, DebugEditorContextCommands.DISABLE_LOGPOINT), { label: 'Disable Logpoint' }));
494
+ registerMenuActions(debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, Object.assign(Object.assign({}, DebugEditorContextCommands.ADD_BREAKPOINT), { label: nls_1.nls.localizeByDefault('Add Breakpoint') }), Object.assign(Object.assign({}, DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT), { label: DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.ADD_LOGPOINT), { label: DebugCommands.ADD_LOGPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.REMOVE_BREAKPOINT), { label: DebugCommands.REMOVE_BREAKPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.EDIT_BREAKPOINT), { label: DebugCommands.EDIT_BREAKPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.ENABLE_BREAKPOINT), { label: nlsEnableBreakpoint('breakpoint', 'Breakpoint') }), Object.assign(Object.assign({}, DebugEditorContextCommands.DISABLE_BREAKPOINT), { label: nlsDisableBreakpoint('breakpoint', 'Breakpoint') }), Object.assign(Object.assign({}, DebugEditorContextCommands.REMOVE_LOGPOINT), { label: DebugCommands.REMOVE_LOGPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.EDIT_LOGPOINT), { label: DebugCommands.EDIT_LOGPOINT.label }), Object.assign(Object.assign({}, DebugEditorContextCommands.ENABLE_LOGPOINT), { label: nlsEnableBreakpoint('logPoint', 'Logpoint') }), Object.assign(Object.assign({}, DebugEditorContextCommands.DISABLE_LOGPOINT), { label: nlsDisableBreakpoint('logPoint', 'Logpoint') }));
470
495
  }
471
496
  registerCommands(registry) {
472
497
  super.registerCommands(registry);
@@ -477,11 +502,11 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
477
502
  execute: (config) => this.start(true, config)
478
503
  });
479
504
  registry.registerCommand(DebugCommands.STOP, {
480
- execute: () => this.manager.terminateSessions(),
505
+ execute: () => this.manager.terminateSession(),
481
506
  isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
482
507
  });
483
508
  registry.registerCommand(DebugCommands.RESTART, {
484
- execute: () => this.manager.restartSessions(),
509
+ execute: () => this.manager.restartSession(),
485
510
  isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
486
511
  });
487
512
  registry.registerCommand(DebugCommands.OPEN_CONFIGURATIONS, {
@@ -549,12 +574,12 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
549
574
  isVisible: () => !!this.selectedThread && this.selectedThread.supportsTerminate
550
575
  });
551
576
  registry.registerCommand(DebugSessionContextCommands.STOP, {
552
- execute: () => this.selectedSession && this.selectedSession.terminate(),
577
+ execute: () => this.selectedSession && this.manager.terminateSession(this.selectedSession),
553
578
  isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
554
579
  isVisible: () => !this.selectedThread
555
580
  });
556
581
  registry.registerCommand(DebugSessionContextCommands.RESTART, {
557
- execute: () => this.selectedSession && this.manager.restart(this.selectedSession),
582
+ execute: () => this.selectedSession && this.manager.restartSession(this.selectedSession),
558
583
  isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
559
584
  isVisible: () => !this.selectedThread
560
585
  });
@@ -926,7 +951,9 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
926
951
  priority: 1
927
952
  };
928
953
  const updateToggleBreakpointsEnabled = () => {
929
- const tooltip = this.breakpointManager.breakpointsEnabled ? 'Deactivate Breakpoints' : 'Activate Breakpoints';
954
+ const activateBreakpoints = nls_1.nls.localizeByDefault('Enable All Breakpoints');
955
+ const deactivateBreakpoints = nls_1.nls.localizeByDefault('Disable All Breakpoints');
956
+ const tooltip = this.breakpointManager.breakpointsEnabled ? deactivateBreakpoints : activateBreakpoints;
930
957
  if (toggleBreakpointsEnabled.tooltip !== tooltip) {
931
958
  toggleBreakpointsEnabled.tooltip = tooltip;
932
959
  onDidChangeToggleBreakpointsEnabled.fire(undefined);
@@ -936,7 +963,7 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
936
963
  id: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
937
964
  command: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
938
965
  icon: browser_1.codicon('add'),
939
- tooltip: 'Add Function Breakpoint'
966
+ tooltip: DebugCommands.ADD_FUNCTION_BREAKPOINT.label
940
967
  });
941
968
  updateToggleBreakpointsEnabled();
942
969
  this.breakpointManager.onDidChangeBreakpoints(updateToggleBreakpointsEnabled);
@@ -951,20 +978,20 @@ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContrib
951
978
  id: DebugCommands.ADD_WATCH_EXPRESSION.id,
952
979
  command: DebugCommands.ADD_WATCH_EXPRESSION.id,
953
980
  icon: browser_1.codicon('add'),
954
- tooltip: 'Add Expression'
981
+ tooltip: DebugCommands.ADD_WATCH_EXPRESSION.label
955
982
  });
956
983
  toolbar.registerItem({
957
984
  id: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
958
985
  command: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
959
986
  icon: browser_1.codicon('collapse-all'),
960
- tooltip: 'Collapse All',
987
+ tooltip: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.label,
961
988
  priority: 1
962
989
  });
963
990
  toolbar.registerItem({
964
991
  id: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
965
992
  command: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
966
993
  icon: browser_1.codicon('close-all'),
967
- tooltip: 'Remove All Expressions',
994
+ tooltip: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.label,
968
995
  priority: 2
969
996
  });
970
997
  }