@theia/debug 1.67.0-next.56 → 1.67.0-next.59

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 (337) hide show
  1. package/lib/browser/breakpoint/breakpoint-manager.d.ts +91 -0
  2. package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +1 -0
  3. package/lib/browser/breakpoint/breakpoint-manager.js +367 -0
  4. package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -0
  5. package/lib/browser/breakpoint/breakpoint-marker.d.ts +65 -0
  6. package/lib/browser/breakpoint/breakpoint-marker.d.ts.map +1 -0
  7. package/lib/browser/breakpoint/breakpoint-marker.js +102 -0
  8. package/lib/browser/breakpoint/breakpoint-marker.js.map +1 -0
  9. package/lib/browser/breakpoint/debug-data-breakpoint-actions.d.ts +17 -0
  10. package/lib/browser/breakpoint/debug-data-breakpoint-actions.d.ts.map +1 -0
  11. package/lib/browser/breakpoint/debug-data-breakpoint-actions.js +166 -0
  12. package/lib/browser/breakpoint/debug-data-breakpoint-actions.js.map +1 -0
  13. package/lib/browser/console/debug-console-contribution.d.ts +45 -0
  14. package/lib/browser/console/debug-console-contribution.d.ts.map +1 -0
  15. package/lib/browser/console/debug-console-contribution.js +233 -0
  16. package/lib/browser/console/debug-console-contribution.js.map +1 -0
  17. package/lib/browser/console/debug-console-items.d.ts +98 -0
  18. package/lib/browser/console/debug-console-items.d.ts.map +1 -0
  19. package/lib/browser/console/debug-console-items.js +346 -0
  20. package/lib/browser/console/debug-console-items.js.map +1 -0
  21. package/lib/browser/console/debug-console-session.d.ts +32 -0
  22. package/lib/browser/console/debug-console-session.d.ts.map +1 -0
  23. package/lib/browser/console/debug-console-session.js +192 -0
  24. package/lib/browser/console/debug-console-session.js.map +1 -0
  25. package/lib/browser/debug-call-stack-item-type-key.d.ts +4 -0
  26. package/lib/browser/debug-call-stack-item-type-key.d.ts.map +1 -0
  27. package/lib/browser/debug-call-stack-item-type-key.js +20 -0
  28. package/lib/browser/debug-call-stack-item-type-key.js.map +1 -0
  29. package/lib/browser/debug-configuration-manager.d.ts +103 -0
  30. package/lib/browser/debug-configuration-manager.d.ts.map +1 -0
  31. package/lib/browser/debug-configuration-manager.js +545 -0
  32. package/lib/browser/debug-configuration-manager.js.map +1 -0
  33. package/lib/browser/debug-configuration-model.d.ts +30 -0
  34. package/lib/browser/debug-configuration-model.d.ts.map +1 -0
  35. package/lib/browser/debug-configuration-model.js +80 -0
  36. package/lib/browser/debug-configuration-model.js.map +1 -0
  37. package/lib/browser/debug-contribution.d.ts +23 -0
  38. package/lib/browser/debug-contribution.d.ts.map +1 -0
  39. package/lib/browser/debug-contribution.js +20 -0
  40. package/lib/browser/debug-contribution.js.map +1 -0
  41. package/lib/browser/debug-frontend-application-contribution.d.ts +252 -0
  42. package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -0
  43. package/lib/browser/debug-frontend-application-contribution.js +1696 -0
  44. package/lib/browser/debug-frontend-application-contribution.js.map +1 -0
  45. package/lib/browser/debug-frontend-module.d.ts +5 -0
  46. package/lib/browser/debug-frontend-module.d.ts.map +1 -0
  47. package/lib/browser/debug-frontend-module.js +112 -0
  48. package/lib/browser/debug-frontend-module.js.map +1 -0
  49. package/lib/browser/debug-package.spec.d.ts +1 -0
  50. package/lib/browser/debug-package.spec.d.ts.map +1 -0
  51. package/lib/browser/debug-package.spec.js +19 -0
  52. package/lib/browser/debug-package.spec.js.map +1 -0
  53. package/lib/browser/debug-prefix-configuration.d.ts +52 -0
  54. package/lib/browser/debug-prefix-configuration.d.ts.map +1 -0
  55. package/lib/browser/debug-prefix-configuration.js +202 -0
  56. package/lib/browser/debug-prefix-configuration.js.map +1 -0
  57. package/lib/browser/debug-resource.d.ts +15 -0
  58. package/lib/browser/debug-resource.d.ts.map +1 -0
  59. package/lib/browser/debug-resource.js +58 -0
  60. package/lib/browser/debug-resource.js.map +1 -0
  61. package/lib/browser/debug-schema-updater.d.ts +14 -0
  62. package/lib/browser/debug-schema-updater.d.ts.map +1 -0
  63. package/lib/browser/debug-schema-updater.js +161 -0
  64. package/lib/browser/debug-schema-updater.js.map +1 -0
  65. package/lib/browser/debug-session-configuration-label-provider.d.ts +11 -0
  66. package/lib/browser/debug-session-configuration-label-provider.d.ts.map +1 -0
  67. package/lib/browser/debug-session-configuration-label-provider.js +48 -0
  68. package/lib/browser/debug-session-configuration-label-provider.js.map +1 -0
  69. package/lib/browser/debug-session-configuration-label-provider.spec.d.ts +2 -0
  70. package/lib/browser/debug-session-configuration-label-provider.spec.d.ts.map +1 -0
  71. package/lib/browser/debug-session-configuration-label-provider.spec.js +84 -0
  72. package/lib/browser/debug-session-configuration-label-provider.spec.js.map +1 -0
  73. package/lib/browser/debug-session-connection.d.ts +111 -0
  74. package/lib/browser/debug-session-connection.d.ts.map +1 -0
  75. package/lib/browser/debug-session-connection.js +259 -0
  76. package/lib/browser/debug-session-connection.js.map +1 -0
  77. package/lib/browser/debug-session-contribution.d.ts +77 -0
  78. package/lib/browser/debug-session-contribution.d.ts.map +1 -0
  79. package/lib/browser/debug-session-contribution.js +143 -0
  80. package/lib/browser/debug-session-contribution.js.map +1 -0
  81. package/lib/browser/debug-session-manager.d.ts +140 -0
  82. package/lib/browser/debug-session-manager.d.ts.map +1 -0
  83. package/lib/browser/debug-session-manager.js +637 -0
  84. package/lib/browser/debug-session-manager.js.map +1 -0
  85. package/lib/browser/debug-session-options.d.ts +56 -0
  86. package/lib/browser/debug-session-options.d.ts.map +1 -0
  87. package/lib/browser/debug-session-options.js +92 -0
  88. package/lib/browser/debug-session-options.js.map +1 -0
  89. package/lib/browser/debug-session.d.ts +195 -0
  90. package/lib/browser/debug-session.d.ts.map +1 -0
  91. package/lib/browser/debug-session.js +946 -0
  92. package/lib/browser/debug-session.js.map +1 -0
  93. package/lib/browser/debug-tab-bar-decorator.d.ts +17 -0
  94. package/lib/browser/debug-tab-bar-decorator.d.ts.map +1 -0
  95. package/lib/browser/debug-tab-bar-decorator.js +63 -0
  96. package/lib/browser/debug-tab-bar-decorator.js.map +1 -0
  97. package/lib/browser/debug-watch-manager.d.ts +22 -0
  98. package/lib/browser/debug-watch-manager.d.ts.map +1 -0
  99. package/lib/browser/debug-watch-manager.js +86 -0
  100. package/lib/browser/debug-watch-manager.js.map +1 -0
  101. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts +7 -0
  102. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts.map +1 -0
  103. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js +39 -0
  104. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js.map +1 -0
  105. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts +20 -0
  106. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts.map +1 -0
  107. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js +111 -0
  108. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js.map +1 -0
  109. package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts +25 -0
  110. package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts.map +1 -0
  111. package/lib/browser/disassembly-view/disassembly-view-contribution.js +124 -0
  112. package/lib/browser/disassembly-view/disassembly-view-contribution.js.map +1 -0
  113. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts +39 -0
  114. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts.map +1 -0
  115. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js +213 -0
  116. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js.map +1 -0
  117. package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts +16 -0
  118. package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts.map +1 -0
  119. package/lib/browser/disassembly-view/disassembly-view-table-delegate.js +39 -0
  120. package/lib/browser/disassembly-view/disassembly-view-table-delegate.js.map +1 -0
  121. package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts +38 -0
  122. package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts.map +1 -0
  123. package/lib/browser/disassembly-view/disassembly-view-utilities.js +18 -0
  124. package/lib/browser/disassembly-view/disassembly-view-utilities.js.map +1 -0
  125. package/lib/browser/disassembly-view/disassembly-view-widget.d.ts +61 -0
  126. package/lib/browser/disassembly-view/disassembly-view-widget.d.ts.map +1 -0
  127. package/lib/browser/disassembly-view/disassembly-view-widget.js +446 -0
  128. package/lib/browser/disassembly-view/disassembly-view-widget.js.map +1 -0
  129. package/lib/browser/editor/debug-breakpoint-widget.d.ts +58 -0
  130. package/lib/browser/editor/debug-breakpoint-widget.d.ts.map +1 -0
  131. package/lib/browser/editor/debug-breakpoint-widget.js +270 -0
  132. package/lib/browser/editor/debug-breakpoint-widget.js.map +1 -0
  133. package/lib/browser/editor/debug-editor-model.d.ts +87 -0
  134. package/lib/browser/editor/debug-editor-model.d.ts.map +1 -0
  135. package/lib/browser/editor/debug-editor-model.js +499 -0
  136. package/lib/browser/editor/debug-editor-model.js.map +1 -0
  137. package/lib/browser/editor/debug-editor-service.d.ts +38 -0
  138. package/lib/browser/editor/debug-editor-service.d.ts.map +1 -0
  139. package/lib/browser/editor/debug-editor-service.js +183 -0
  140. package/lib/browser/editor/debug-editor-service.js.map +1 -0
  141. package/lib/browser/editor/debug-editor.d.ts +4 -0
  142. package/lib/browser/editor/debug-editor.d.ts.map +1 -0
  143. package/lib/browser/editor/debug-editor.js +20 -0
  144. package/lib/browser/editor/debug-editor.js.map +1 -0
  145. package/lib/browser/editor/debug-exception-widget.d.ts +30 -0
  146. package/lib/browser/editor/debug-exception-widget.d.ts.map +1 -0
  147. package/lib/browser/editor/debug-exception-widget.js +107 -0
  148. package/lib/browser/editor/debug-exception-widget.js.map +1 -0
  149. package/lib/browser/editor/debug-expression-provider.d.ts +17 -0
  150. package/lib/browser/editor/debug-expression-provider.d.ts.map +1 -0
  151. package/lib/browser/editor/debug-expression-provider.js +107 -0
  152. package/lib/browser/editor/debug-expression-provider.js.map +1 -0
  153. package/lib/browser/editor/debug-hover-source.d.ts +19 -0
  154. package/lib/browser/editor/debug-hover-source.d.ts.map +1 -0
  155. package/lib/browser/editor/debug-hover-source.js +110 -0
  156. package/lib/browser/editor/debug-hover-source.js.map +1 -0
  157. package/lib/browser/editor/debug-hover-widget.d.ts +61 -0
  158. package/lib/browser/editor/debug-hover-widget.d.ts.map +1 -0
  159. package/lib/browser/editor/debug-hover-widget.js +271 -0
  160. package/lib/browser/editor/debug-hover-widget.js.map +1 -0
  161. package/lib/browser/editor/debug-inline-value-decorator.d.ts +20 -0
  162. package/lib/browser/editor/debug-inline-value-decorator.d.ts.map +1 -0
  163. package/lib/browser/editor/debug-inline-value-decorator.js +326 -0
  164. package/lib/browser/editor/debug-inline-value-decorator.js.map +1 -0
  165. package/lib/browser/model/debug-breakpoint.d.ts +48 -0
  166. package/lib/browser/model/debug-breakpoint.d.ts.map +1 -0
  167. package/lib/browser/model/debug-breakpoint.js +111 -0
  168. package/lib/browser/model/debug-breakpoint.js.map +1 -0
  169. package/lib/browser/model/debug-data-breakpoint.d.ts +16 -0
  170. package/lib/browser/model/debug-data-breakpoint.d.ts.map +1 -0
  171. package/lib/browser/model/debug-data-breakpoint.js +75 -0
  172. package/lib/browser/model/debug-data-breakpoint.js.map +1 -0
  173. package/lib/browser/model/debug-function-breakpoint.d.ts +19 -0
  174. package/lib/browser/model/debug-function-breakpoint.d.ts.map +1 -0
  175. package/lib/browser/model/debug-function-breakpoint.js +93 -0
  176. package/lib/browser/model/debug-function-breakpoint.js.map +1 -0
  177. package/lib/browser/model/debug-instruction-breakpoint.d.ts +15 -0
  178. package/lib/browser/model/debug-instruction-breakpoint.d.ts.map +1 -0
  179. package/lib/browser/model/debug-instruction-breakpoint.js +66 -0
  180. package/lib/browser/model/debug-instruction-breakpoint.js.map +1 -0
  181. package/lib/browser/model/debug-source-breakpoint.d.ts +39 -0
  182. package/lib/browser/model/debug-source-breakpoint.d.ts.map +1 -0
  183. package/lib/browser/model/debug-source-breakpoint.js +219 -0
  184. package/lib/browser/model/debug-source-breakpoint.js.map +1 -0
  185. package/lib/browser/model/debug-source.d.ts +25 -0
  186. package/lib/browser/model/debug-source.d.ts.map +1 -0
  187. package/lib/browser/model/debug-source.js +81 -0
  188. package/lib/browser/model/debug-source.js.map +1 -0
  189. package/lib/browser/model/debug-stack-frame.d.ts +45 -0
  190. package/lib/browser/model/debug-stack-frame.d.ts.map +1 -0
  191. package/lib/browser/model/debug-stack-frame.js +157 -0
  192. package/lib/browser/model/debug-stack-frame.js.map +1 -0
  193. package/lib/browser/model/debug-thread.d.ts +68 -0
  194. package/lib/browser/model/debug-thread.d.ts.map +1 -0
  195. package/lib/browser/model/debug-thread.js +262 -0
  196. package/lib/browser/model/debug-thread.js.map +1 -0
  197. package/lib/browser/view/debug-action.d.ts +18 -0
  198. package/lib/browser/view/debug-action.d.ts.map +1 -0
  199. package/lib/browser/view/debug-action.js +44 -0
  200. package/lib/browser/view/debug-action.js.map +1 -0
  201. package/lib/browser/view/debug-breakpoints-source.d.ts +10 -0
  202. package/lib/browser/view/debug-breakpoints-source.d.ts.map +1 -0
  203. package/lib/browser/view/debug-breakpoints-source.js +58 -0
  204. package/lib/browser/view/debug-breakpoints-source.js.map +1 -0
  205. package/lib/browser/view/debug-breakpoints-widget.d.ts +23 -0
  206. package/lib/browser/view/debug-breakpoints-widget.d.ts.map +1 -0
  207. package/lib/browser/view/debug-breakpoints-widget.js +81 -0
  208. package/lib/browser/view/debug-breakpoints-widget.js.map +1 -0
  209. package/lib/browser/view/debug-configuration-select.d.ts +67 -0
  210. package/lib/browser/view/debug-configuration-select.d.ts.map +1 -0
  211. package/lib/browser/view/debug-configuration-select.js +212 -0
  212. package/lib/browser/view/debug-configuration-select.js.map +1 -0
  213. package/lib/browser/view/debug-configuration-widget.d.ts +33 -0
  214. package/lib/browser/view/debug-configuration-widget.d.ts.map +1 -0
  215. package/lib/browser/view/debug-configuration-widget.js +137 -0
  216. package/lib/browser/view/debug-configuration-widget.js.map +1 -0
  217. package/lib/browser/view/debug-exception-breakpoint.d.ts +15 -0
  218. package/lib/browser/view/debug-exception-breakpoint.d.ts.map +1 -0
  219. package/lib/browser/view/debug-exception-breakpoint.js +62 -0
  220. package/lib/browser/view/debug-exception-breakpoint.js.map +1 -0
  221. package/lib/browser/view/debug-session-widget.d.ts +29 -0
  222. package/lib/browser/view/debug-session-widget.d.ts.map +1 -0
  223. package/lib/browser/view/debug-session-widget.js +127 -0
  224. package/lib/browser/view/debug-session-widget.js.map +1 -0
  225. package/lib/browser/view/debug-stack-frames-source.d.ts +18 -0
  226. package/lib/browser/view/debug-stack-frames-source.d.ts.map +1 -0
  227. package/lib/browser/view/debug-stack-frames-source.js +83 -0
  228. package/lib/browser/view/debug-stack-frames-source.js.map +1 -0
  229. package/lib/browser/view/debug-stack-frames-widget.d.ts +25 -0
  230. package/lib/browser/view/debug-stack-frames-widget.d.ts.map +1 -0
  231. package/lib/browser/view/debug-stack-frames-widget.js +152 -0
  232. package/lib/browser/view/debug-stack-frames-widget.js.map +1 -0
  233. package/lib/browser/view/debug-threads-source.d.ts +9 -0
  234. package/lib/browser/view/debug-threads-source.d.ts.map +1 -0
  235. package/lib/browser/view/debug-threads-source.js +56 -0
  236. package/lib/browser/view/debug-threads-source.js.map +1 -0
  237. package/lib/browser/view/debug-threads-widget.d.ts +27 -0
  238. package/lib/browser/view/debug-threads-widget.d.ts.map +1 -0
  239. package/lib/browser/view/debug-threads-widget.js +139 -0
  240. package/lib/browser/view/debug-threads-widget.js.map +1 -0
  241. package/lib/browser/view/debug-toolbar-widget.d.ts +34 -0
  242. package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -0
  243. package/lib/browser/view/debug-toolbar-widget.js +139 -0
  244. package/lib/browser/view/debug-toolbar-widget.js.map +1 -0
  245. package/lib/browser/view/debug-variables-source.d.ts +10 -0
  246. package/lib/browser/view/debug-variables-source.d.ts.map +1 -0
  247. package/lib/browser/view/debug-variables-source.js +53 -0
  248. package/lib/browser/view/debug-variables-source.js.map +1 -0
  249. package/lib/browser/view/debug-variables-widget.d.ts +28 -0
  250. package/lib/browser/view/debug-variables-widget.d.ts.map +1 -0
  251. package/lib/browser/view/debug-variables-widget.js +152 -0
  252. package/lib/browser/view/debug-variables-widget.js.map +1 -0
  253. package/lib/browser/view/debug-view-model.d.ts +55 -0
  254. package/lib/browser/view/debug-view-model.d.ts.map +1 -0
  255. package/lib/browser/view/debug-view-model.js +215 -0
  256. package/lib/browser/view/debug-view-model.js.map +1 -0
  257. package/lib/browser/view/debug-watch-expression.d.ts +33 -0
  258. package/lib/browser/view/debug-watch-expression.d.ts.map +1 -0
  259. package/lib/browser/view/debug-watch-expression.js +93 -0
  260. package/lib/browser/view/debug-watch-expression.js.map +1 -0
  261. package/lib/browser/view/debug-watch-source.d.ts +10 -0
  262. package/lib/browser/view/debug-watch-source.d.ts.map +1 -0
  263. package/lib/browser/view/debug-watch-source.js +51 -0
  264. package/lib/browser/view/debug-watch-source.js.map +1 -0
  265. package/lib/browser/view/debug-watch-widget.d.ts +17 -0
  266. package/lib/browser/view/debug-watch-widget.d.ts.map +1 -0
  267. package/lib/browser/view/debug-watch-widget.js +71 -0
  268. package/lib/browser/view/debug-watch-widget.js.map +1 -0
  269. package/lib/browser/view/debug-widget.d.ts +24 -0
  270. package/lib/browser/view/debug-widget.d.ts.map +1 -0
  271. package/lib/browser/view/debug-widget.js +101 -0
  272. package/lib/browser/view/debug-widget.js.map +1 -0
  273. package/lib/common/debug-adapter-contribution-registry.d.ts +60 -0
  274. package/lib/common/debug-adapter-contribution-registry.d.ts.map +1 -0
  275. package/lib/common/debug-adapter-contribution-registry.js +205 -0
  276. package/lib/common/debug-adapter-contribution-registry.js.map +1 -0
  277. package/lib/common/debug-adapter-session.d.ts +19 -0
  278. package/lib/common/debug-adapter-session.d.ts.map +1 -0
  279. package/lib/common/debug-adapter-session.js +79 -0
  280. package/lib/common/debug-adapter-session.js.map +1 -0
  281. package/lib/common/debug-common.d.ts +2 -0
  282. package/lib/common/debug-common.d.ts.map +1 -0
  283. package/lib/common/debug-common.js +21 -0
  284. package/lib/common/debug-common.js.map +1 -0
  285. package/lib/common/debug-compound.d.ts +15 -0
  286. package/lib/common/debug-compound.d.ts.map +1 -0
  287. package/lib/common/debug-compound.js +28 -0
  288. package/lib/common/debug-compound.js.map +1 -0
  289. package/lib/common/debug-configuration.d.ts +77 -0
  290. package/lib/common/debug-configuration.d.ts.map +1 -0
  291. package/lib/common/debug-configuration.js +32 -0
  292. package/lib/common/debug-configuration.js.map +1 -0
  293. package/lib/common/debug-model.d.ts +153 -0
  294. package/lib/common/debug-model.d.ts.map +1 -0
  295. package/lib/common/debug-model.js +36 -0
  296. package/lib/common/debug-model.js.map +1 -0
  297. package/lib/common/debug-preferences.d.ts +18 -0
  298. package/lib/common/debug-preferences.d.ts.map +1 -0
  299. package/lib/common/debug-preferences.js +89 -0
  300. package/lib/common/debug-preferences.js.map +1 -0
  301. package/lib/common/debug-service.d.ts +124 -0
  302. package/lib/common/debug-service.d.ts.map +1 -0
  303. package/lib/common/debug-service.js +67 -0
  304. package/lib/common/debug-service.js.map +1 -0
  305. package/lib/common/debug-uri-utils.d.ts +24 -0
  306. package/lib/common/debug-uri-utils.d.ts.map +1 -0
  307. package/lib/common/debug-uri-utils.js +27 -0
  308. package/lib/common/debug-uri-utils.js.map +1 -0
  309. package/lib/common/inline-debug-adapter.d.ts +19 -0
  310. package/lib/common/inline-debug-adapter.d.ts.map +1 -0
  311. package/lib/common/inline-debug-adapter.js +45 -0
  312. package/lib/common/inline-debug-adapter.js.map +1 -0
  313. package/lib/common/launch-preferences.d.ts +6 -0
  314. package/lib/common/launch-preferences.d.ts.map +1 -0
  315. package/lib/common/launch-preferences.js +37 -0
  316. package/lib/common/launch-preferences.js.map +1 -0
  317. package/lib/node/debug-adapter-factory.d.ts +20 -0
  318. package/lib/node/debug-adapter-factory.d.ts.map +1 -0
  319. package/lib/node/debug-adapter-factory.js +89 -0
  320. package/lib/node/debug-adapter-factory.js.map +1 -0
  321. package/lib/node/debug-adapter-session-manager.d.ts +38 -0
  322. package/lib/node/debug-adapter-session-manager.d.ts.map +1 -0
  323. package/lib/node/debug-adapter-session-manager.js +104 -0
  324. package/lib/node/debug-adapter-session-manager.js.map +1 -0
  325. package/lib/node/debug-backend-module.d.ts +4 -0
  326. package/lib/node/debug-backend-module.d.ts.map +1 -0
  327. package/lib/node/debug-backend-module.js +45 -0
  328. package/lib/node/debug-backend-module.js.map +1 -0
  329. package/lib/node/debug-service-impl.d.ts +31 -0
  330. package/lib/node/debug-service-impl.d.ts.map +1 -0
  331. package/lib/node/debug-service-impl.js +117 -0
  332. package/lib/node/debug-service-impl.js.map +1 -0
  333. package/lib/node/stream-debug-adapter.d.ts +41 -0
  334. package/lib/node/stream-debug-adapter.d.ts.map +1 -0
  335. package/lib/node/stream-debug-adapter.js +113 -0
  336. package/lib/node/stream-debug-adapter.js.map +1 -0
  337. package/package.json +15 -15
@@ -0,0 +1,1696 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2018 TypeFox and others.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.DebugFrontendApplicationContribution = exports.DebugBreakpointWidgetCommands = exports.DebugEditorContextCommands = exports.DebugSessionContextCommands = exports.DebugThreadContextCommands = exports.DebugCommands = exports.DebugMenus = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const browser_1 = require("@theia/core/lib/browser");
21
+ const source_tree_1 = require("@theia/core/lib/browser/source-tree");
22
+ const inversify_1 = require("@theia/core/shared/inversify");
23
+ const monaco = require("@theia/monaco-editor-core");
24
+ const common_1 = require("@theia/core/lib/common");
25
+ const promise_util_1 = require("@theia/core/lib/common/promise-util");
26
+ const browser_2 = require("@theia/editor/lib/browser");
27
+ const debug_session_manager_1 = require("./debug-session-manager");
28
+ const debug_widget_1 = require("./view/debug-widget");
29
+ const breakpoint_marker_1 = require("./breakpoint/breakpoint-marker");
30
+ const breakpoint_manager_1 = require("./breakpoint/breakpoint-manager");
31
+ const debug_configuration_manager_1 = require("./debug-configuration-manager");
32
+ const debug_session_1 = require("./debug-session");
33
+ const debug_breakpoints_widget_1 = require("./view/debug-breakpoints-widget");
34
+ const debug_source_breakpoint_1 = require("./model/debug-source-breakpoint");
35
+ const debug_threads_widget_1 = require("./view/debug-threads-widget");
36
+ const debug_thread_1 = require("./model/debug-thread");
37
+ const debug_stack_frames_widget_1 = require("./view/debug-stack-frames-widget");
38
+ const debug_stack_frame_1 = require("./model/debug-stack-frame");
39
+ const debug_variables_widget_1 = require("./view/debug-variables-widget");
40
+ const debug_console_items_1 = require("./console/debug-console-items");
41
+ const debug_editor_model_1 = require("./editor/debug-editor-model");
42
+ const debug_editor_service_1 = require("./editor/debug-editor-service");
43
+ const debug_console_contribution_1 = require("./console/debug-console-contribution");
44
+ const debug_service_1 = require("../common/debug-service");
45
+ const debug_schema_updater_1 = require("./debug-schema-updater");
46
+ const debug_preferences_1 = require("../common/debug-preferences");
47
+ const debug_watch_widget_1 = require("./view/debug-watch-widget");
48
+ const debug_watch_expression_1 = require("./view/debug-watch-expression");
49
+ const debug_watch_manager_1 = require("./debug-watch-manager");
50
+ const debug_session_options_1 = require("./debug-session-options");
51
+ const debug_function_breakpoint_1 = require("./model/debug-function-breakpoint");
52
+ const debug_breakpoint_1 = require("./model/debug-breakpoint");
53
+ const nls_1 = require("@theia/core/lib/common/nls");
54
+ const debug_instruction_breakpoint_1 = require("./model/debug-instruction-breakpoint");
55
+ const debug_exception_breakpoint_1 = require("./view/debug-exception-breakpoint");
56
+ const debug_toolbar_widget_1 = require("./view/debug-toolbar-widget");
57
+ const console_widget_1 = require("@theia/console/lib/browser/console-widget");
58
+ const console_contribution_1 = require("@theia/console/lib/browser/console-contribution");
59
+ const debug_hover_widget_1 = require("./editor/debug-hover-widget");
60
+ const debug_expression_provider_1 = require("./editor/debug-expression-provider");
61
+ const debug_data_breakpoint_actions_1 = require("./breakpoint/debug-data-breakpoint-actions");
62
+ var DebugMenus;
63
+ (function (DebugMenus) {
64
+ DebugMenus.DEBUG = [...common_1.MAIN_MENU_BAR, '6_debug'];
65
+ DebugMenus.DEBUG_CONTROLS = [...DebugMenus.DEBUG, 'a_controls'];
66
+ DebugMenus.DEBUG_CONFIGURATION = [...DebugMenus.DEBUG, 'b_configuration'];
67
+ DebugMenus.DEBUG_THREADS = [...DebugMenus.DEBUG, 'c_threads'];
68
+ DebugMenus.DEBUG_SESSIONS = [...DebugMenus.DEBUG, 'd_sessions'];
69
+ DebugMenus.DEBUG_BREAKPOINT = [...DebugMenus.DEBUG, 'e_breakpoint'];
70
+ DebugMenus.DEBUG_NEW_BREAKPOINT = [...DebugMenus.DEBUG_BREAKPOINT, 'a_new_breakpoint'];
71
+ DebugMenus.DEBUG_BREAKPOINTS = [...DebugMenus.DEBUG, 'f_breakpoints'];
72
+ })(DebugMenus || (exports.DebugMenus = DebugMenus = {}));
73
+ function nlsEditBreakpoint(breakpoint) {
74
+ return nls_1.nls.localizeByDefault('Edit {0}...', nls_1.nls.localizeByDefault(breakpoint));
75
+ }
76
+ function nlsRemoveBreakpoint(breakpoint) {
77
+ return nls_1.nls.localizeByDefault('Remove {0}', nls_1.nls.localizeByDefault(breakpoint));
78
+ }
79
+ function nlsEnableBreakpoint(breakpoint) {
80
+ return nls_1.nls.localizeByDefault('Enable {0}', nls_1.nls.localizeByDefault(breakpoint));
81
+ }
82
+ function nlsDisableBreakpoint(breakpoint) {
83
+ return nls_1.nls.localizeByDefault('Disable {0}', nls_1.nls.localizeByDefault(breakpoint));
84
+ }
85
+ var DebugCommands;
86
+ (function (DebugCommands) {
87
+ DebugCommands.DEBUG_CATEGORY = 'Debug';
88
+ DebugCommands.DEBUG_CATEGORY_KEY = nls_1.nls.getDefaultKey(DebugCommands.DEBUG_CATEGORY);
89
+ DebugCommands.START = common_1.Command.toDefaultLocalizedCommand({
90
+ id: 'workbench.action.debug.start',
91
+ category: DebugCommands.DEBUG_CATEGORY,
92
+ label: 'Start Debugging',
93
+ iconClass: (0, browser_1.codicon)('debug-alt')
94
+ });
95
+ DebugCommands.START_NO_DEBUG = common_1.Command.toDefaultLocalizedCommand({
96
+ id: 'workbench.action.debug.run',
97
+ category: DebugCommands.DEBUG_CATEGORY,
98
+ label: 'Start Without Debugging'
99
+ });
100
+ DebugCommands.STOP = common_1.Command.toDefaultLocalizedCommand({
101
+ id: 'workbench.action.debug.stop',
102
+ category: DebugCommands.DEBUG_CATEGORY,
103
+ label: 'Stop',
104
+ iconClass: (0, browser_1.codicon)('debug-stop')
105
+ });
106
+ DebugCommands.RESTART = common_1.Command.toDefaultLocalizedCommand({
107
+ id: 'workbench.action.debug.restart',
108
+ category: DebugCommands.DEBUG_CATEGORY,
109
+ label: 'Restart',
110
+ });
111
+ DebugCommands.OPEN_CONFIGURATIONS = common_1.Command.toDefaultLocalizedCommand({
112
+ id: 'debug.configurations.open',
113
+ category: DebugCommands.DEBUG_CATEGORY,
114
+ label: 'Open Configurations'
115
+ });
116
+ DebugCommands.ADD_CONFIGURATION = common_1.Command.toDefaultLocalizedCommand({
117
+ id: 'debug.configurations.add',
118
+ category: DebugCommands.DEBUG_CATEGORY,
119
+ label: 'Add Configuration...'
120
+ });
121
+ DebugCommands.STEP_OVER = common_1.Command.toDefaultLocalizedCommand({
122
+ id: 'workbench.action.debug.stepOver',
123
+ category: DebugCommands.DEBUG_CATEGORY,
124
+ label: 'Step Over',
125
+ iconClass: (0, browser_1.codicon)('debug-step-over')
126
+ });
127
+ DebugCommands.STEP_INTO = common_1.Command.toDefaultLocalizedCommand({
128
+ id: 'workbench.action.debug.stepInto',
129
+ category: DebugCommands.DEBUG_CATEGORY,
130
+ label: 'Step Into',
131
+ iconClass: (0, browser_1.codicon)('debug-step-into')
132
+ });
133
+ DebugCommands.STEP_OUT = common_1.Command.toDefaultLocalizedCommand({
134
+ id: 'workbench.action.debug.stepOut',
135
+ category: DebugCommands.DEBUG_CATEGORY,
136
+ label: 'Step Out',
137
+ iconClass: (0, browser_1.codicon)('debug-step-out')
138
+ });
139
+ DebugCommands.CONTINUE = common_1.Command.toDefaultLocalizedCommand({
140
+ id: 'workbench.action.debug.continue',
141
+ category: DebugCommands.DEBUG_CATEGORY,
142
+ label: 'Continue',
143
+ iconClass: (0, browser_1.codicon)('debug-continue')
144
+ });
145
+ DebugCommands.PAUSE = common_1.Command.toDefaultLocalizedCommand({
146
+ id: 'workbench.action.debug.pause',
147
+ category: DebugCommands.DEBUG_CATEGORY,
148
+ label: 'Pause',
149
+ iconClass: (0, browser_1.codicon)('debug-pause')
150
+ });
151
+ DebugCommands.CONTINUE_ALL = common_1.Command.toLocalizedCommand({
152
+ id: 'debug.thread.continue.all',
153
+ category: DebugCommands.DEBUG_CATEGORY,
154
+ label: 'Continue All',
155
+ iconClass: (0, browser_1.codicon)('debug-continue')
156
+ }, 'theia/debug/continueAll', DebugCommands.DEBUG_CATEGORY_KEY);
157
+ DebugCommands.PAUSE_ALL = common_1.Command.toLocalizedCommand({
158
+ id: 'debug.thread.pause.all',
159
+ category: DebugCommands.DEBUG_CATEGORY,
160
+ label: 'Pause All',
161
+ iconClass: (0, browser_1.codicon)('debug-pause')
162
+ }, 'theia/debug/pauseAll', DebugCommands.DEBUG_CATEGORY_KEY);
163
+ DebugCommands.TOGGLE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
164
+ id: 'editor.debug.action.toggleBreakpoint',
165
+ category: DebugCommands.DEBUG_CATEGORY,
166
+ label: 'Toggle Breakpoint',
167
+ });
168
+ DebugCommands.INLINE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
169
+ id: 'editor.debug.action.inlineBreakpoint',
170
+ category: DebugCommands.DEBUG_CATEGORY,
171
+ label: 'Inline Breakpoint',
172
+ });
173
+ DebugCommands.ADD_CONDITIONAL_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
174
+ id: 'debug.breakpoint.add.conditional',
175
+ category: DebugCommands.DEBUG_CATEGORY,
176
+ label: 'Add Conditional Breakpoint...',
177
+ });
178
+ DebugCommands.ADD_LOGPOINT = common_1.Command.toDefaultLocalizedCommand({
179
+ id: 'debug.breakpoint.add.logpoint',
180
+ category: DebugCommands.DEBUG_CATEGORY,
181
+ label: 'Add Logpoint...',
182
+ });
183
+ DebugCommands.ADD_FUNCTION_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
184
+ id: 'debug.breakpoint.add.function',
185
+ category: DebugCommands.DEBUG_CATEGORY,
186
+ label: 'Add Function Breakpoint',
187
+ });
188
+ DebugCommands.ADD_DATA_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
189
+ id: 'debug.breakpoint.add.data',
190
+ category: DebugCommands.DEBUG_CATEGORY,
191
+ label: 'Add Data Breakpoint at Address'
192
+ });
193
+ DebugCommands.ENABLE_SELECTED_BREAKPOINTS = common_1.Command.toLocalizedCommand({
194
+ id: 'debug.breakpoint.enableSelected',
195
+ category: DebugCommands.DEBUG_CATEGORY,
196
+ label: 'Enable Selected Breakpoints',
197
+ }, 'theia/debug/enableSelectedBreakpoints', DebugCommands.DEBUG_CATEGORY_KEY);
198
+ DebugCommands.ENABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
199
+ id: 'debug.breakpoint.enableAll',
200
+ category: DebugCommands.DEBUG_CATEGORY,
201
+ label: 'Enable All Breakpoints',
202
+ });
203
+ DebugCommands.DISABLE_SELECTED_BREAKPOINTS = common_1.Command.toLocalizedCommand({
204
+ id: 'debug.breakpoint.disableSelected',
205
+ category: DebugCommands.DEBUG_CATEGORY,
206
+ label: 'Disable Selected Breakpoints',
207
+ }, 'theia/debug/disableSelectedBreakpoints', DebugCommands.DEBUG_CATEGORY_KEY);
208
+ DebugCommands.DISABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
209
+ id: 'debug.breakpoint.disableAll',
210
+ category: DebugCommands.DEBUG_CATEGORY,
211
+ label: 'Disable All Breakpoints',
212
+ });
213
+ DebugCommands.EDIT_BREAKPOINT = common_1.Command.toLocalizedCommand({
214
+ id: 'debug.breakpoint.edit',
215
+ category: DebugCommands.DEBUG_CATEGORY,
216
+ originalLabel: 'Edit Breakpoint...',
217
+ label: nlsEditBreakpoint('Breakpoint')
218
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
219
+ DebugCommands.EDIT_LOGPOINT = common_1.Command.toLocalizedCommand({
220
+ id: 'debug.logpoint.edit',
221
+ category: DebugCommands.DEBUG_CATEGORY,
222
+ originalLabel: 'Edit Logpoint...',
223
+ label: nlsEditBreakpoint('Logpoint')
224
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
225
+ DebugCommands.EDIT_BREAKPOINT_CONDITION = common_1.Command.toLocalizedCommand({
226
+ id: 'debug.breakpoint.editCondition',
227
+ category: DebugCommands.DEBUG_CATEGORY,
228
+ label: 'Edit Condition...'
229
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
230
+ DebugCommands.REMOVE_BREAKPOINT = common_1.Command.toLocalizedCommand({
231
+ id: 'debug.breakpoint.remove',
232
+ category: DebugCommands.DEBUG_CATEGORY,
233
+ originalLabel: 'Remove Breakpoint',
234
+ label: nlsRemoveBreakpoint('Breakpoint')
235
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
236
+ DebugCommands.REMOVE_LOGPOINT = common_1.Command.toLocalizedCommand({
237
+ id: 'debug.logpoint.remove',
238
+ category: DebugCommands.DEBUG_CATEGORY,
239
+ originalLabel: 'Remove Logpoint',
240
+ label: nlsRemoveBreakpoint('Logpoint')
241
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
242
+ DebugCommands.REMOVE_SELECTED_BREAKPOINTS = common_1.Command.toLocalizedCommand({
243
+ id: 'debug.breakpoint.removeSelected',
244
+ category: DebugCommands.DEBUG_CATEGORY,
245
+ label: 'Remove Selected Breakpoints',
246
+ }, '', DebugCommands.DEBUG_CATEGORY_KEY);
247
+ DebugCommands.REMOVE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
248
+ id: 'debug.breakpoint.removeAll',
249
+ category: DebugCommands.DEBUG_CATEGORY,
250
+ label: 'Remove All Breakpoints',
251
+ });
252
+ DebugCommands.TOGGLE_BREAKPOINTS_ENABLED = common_1.Command.toLocalizedCommand({
253
+ id: 'debug.breakpoint.toggleEnabled'
254
+ });
255
+ DebugCommands.SHOW_HOVER = common_1.Command.toDefaultLocalizedCommand({
256
+ id: 'editor.debug.action.showDebugHover',
257
+ label: 'Debug: Show Hover'
258
+ });
259
+ DebugCommands.EVALUATE_IN_DEBUG_CONSOLE = common_1.Command.toDefaultLocalizedCommand({
260
+ id: 'editor.debug.action.selectionToRepl',
261
+ category: DebugCommands.DEBUG_CATEGORY,
262
+ label: 'Evaluate in Debug Console'
263
+ });
264
+ DebugCommands.ADD_TO_WATCH = common_1.Command.toDefaultLocalizedCommand({
265
+ id: 'editor.debug.action.selectionToWatch',
266
+ category: DebugCommands.DEBUG_CATEGORY,
267
+ label: 'Add to Watch'
268
+ });
269
+ DebugCommands.JUMP_TO_CURSOR = common_1.Command.toDefaultLocalizedCommand({
270
+ id: 'editor.debug.action.jumpToCursor',
271
+ category: DebugCommands.DEBUG_CATEGORY,
272
+ label: 'Jump to Cursor'
273
+ });
274
+ DebugCommands.RUN_TO_CURSOR = common_1.Command.toDefaultLocalizedCommand({
275
+ id: 'editor.debug.action.runToCursor',
276
+ category: DebugCommands.DEBUG_CATEGORY,
277
+ label: 'Run to Cursor'
278
+ });
279
+ DebugCommands.RUN_TO_LINE = common_1.Command.toDefaultLocalizedCommand({
280
+ id: 'editor.debug.action.runToLine',
281
+ category: DebugCommands.DEBUG_CATEGORY,
282
+ label: 'Run to Line'
283
+ });
284
+ DebugCommands.RESTART_FRAME = common_1.Command.toDefaultLocalizedCommand({
285
+ id: 'debug.frame.restart',
286
+ category: DebugCommands.DEBUG_CATEGORY,
287
+ label: 'Restart Frame',
288
+ });
289
+ DebugCommands.COPY_CALL_STACK = common_1.Command.toDefaultLocalizedCommand({
290
+ id: 'debug.callStack.copy',
291
+ category: DebugCommands.DEBUG_CATEGORY,
292
+ label: 'Copy Call Stack',
293
+ });
294
+ DebugCommands.SET_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
295
+ id: 'debug.variable.setValue',
296
+ category: DebugCommands.DEBUG_CATEGORY,
297
+ label: 'Set Value',
298
+ });
299
+ DebugCommands.COPY_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
300
+ id: 'debug.variable.copyValue',
301
+ category: DebugCommands.DEBUG_CATEGORY,
302
+ label: 'Copy Value',
303
+ });
304
+ DebugCommands.COPY_VARIABLE_AS_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
305
+ id: 'debug.variable.copyAsExpression',
306
+ category: DebugCommands.DEBUG_CATEGORY,
307
+ label: 'Copy as Expression',
308
+ });
309
+ DebugCommands.WATCH_VARIABLE = common_1.Command.toDefaultLocalizedCommand({
310
+ id: 'debug.variable.watch',
311
+ category: DebugCommands.DEBUG_CATEGORY,
312
+ label: 'Add to Watch',
313
+ });
314
+ DebugCommands.ADD_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
315
+ id: 'debug.watch.addExpression',
316
+ category: DebugCommands.DEBUG_CATEGORY,
317
+ label: 'Add Expression'
318
+ });
319
+ DebugCommands.EDIT_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
320
+ id: 'debug.watch.editExpression',
321
+ category: DebugCommands.DEBUG_CATEGORY,
322
+ label: 'Edit Expression'
323
+ });
324
+ DebugCommands.COPY_WATCH_EXPRESSION_VALUE = common_1.Command.toLocalizedCommand({
325
+ id: 'debug.watch.copyExpressionValue',
326
+ category: DebugCommands.DEBUG_CATEGORY,
327
+ label: 'Copy Expression Value'
328
+ }, 'theia/debug/copyExpressionValue', DebugCommands.DEBUG_CATEGORY_KEY);
329
+ DebugCommands.REMOVE_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
330
+ id: 'debug.watch.removeExpression',
331
+ category: DebugCommands.DEBUG_CATEGORY,
332
+ label: 'Remove Expression'
333
+ });
334
+ DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
335
+ id: 'debug.watch.collapseAllExpressions',
336
+ category: DebugCommands.DEBUG_CATEGORY,
337
+ label: 'Collapse All'
338
+ });
339
+ DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
340
+ id: 'debug.watch.removeAllExpressions',
341
+ category: DebugCommands.DEBUG_CATEGORY,
342
+ label: 'Remove All Expressions'
343
+ });
344
+ })(DebugCommands || (exports.DebugCommands = DebugCommands = {}));
345
+ var DebugThreadContextCommands;
346
+ (function (DebugThreadContextCommands) {
347
+ DebugThreadContextCommands.STEP_OVER = {
348
+ id: 'debug.thread.context.context.next'
349
+ };
350
+ DebugThreadContextCommands.STEP_INTO = {
351
+ id: 'debug.thread.context.stepin'
352
+ };
353
+ DebugThreadContextCommands.STEP_OUT = {
354
+ id: 'debug.thread.context.stepout'
355
+ };
356
+ DebugThreadContextCommands.CONTINUE = {
357
+ id: 'debug.thread.context.continue'
358
+ };
359
+ DebugThreadContextCommands.PAUSE = {
360
+ id: 'debug.thread.context.pause'
361
+ };
362
+ DebugThreadContextCommands.TERMINATE = {
363
+ id: 'debug.thread.context.terminate'
364
+ };
365
+ })(DebugThreadContextCommands || (exports.DebugThreadContextCommands = DebugThreadContextCommands = {}));
366
+ var DebugSessionContextCommands;
367
+ (function (DebugSessionContextCommands) {
368
+ DebugSessionContextCommands.STOP = {
369
+ id: 'debug.session.context.stop'
370
+ };
371
+ DebugSessionContextCommands.RESTART = {
372
+ id: 'debug.session.context.restart'
373
+ };
374
+ DebugSessionContextCommands.PAUSE_ALL = {
375
+ id: 'debug.session.context.pauseAll'
376
+ };
377
+ DebugSessionContextCommands.CONTINUE_ALL = {
378
+ id: 'debug.session.context.continueAll'
379
+ };
380
+ DebugSessionContextCommands.REVEAL = {
381
+ id: 'debug.session.context.reveal'
382
+ };
383
+ })(DebugSessionContextCommands || (exports.DebugSessionContextCommands = DebugSessionContextCommands = {}));
384
+ var DebugEditorContextCommands;
385
+ (function (DebugEditorContextCommands) {
386
+ DebugEditorContextCommands.ADD_BREAKPOINT = {
387
+ id: 'debug.editor.context.addBreakpoint'
388
+ };
389
+ DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT = {
390
+ id: 'debug.editor.context.addBreakpoint.conditional'
391
+ };
392
+ DebugEditorContextCommands.ADD_LOGPOINT = {
393
+ id: 'debug.editor.context.add.logpoint'
394
+ };
395
+ DebugEditorContextCommands.REMOVE_BREAKPOINT = {
396
+ id: 'debug.editor.context.removeBreakpoint'
397
+ };
398
+ DebugEditorContextCommands.EDIT_BREAKPOINT = {
399
+ id: 'debug.editor.context.edit.breakpoint'
400
+ };
401
+ DebugEditorContextCommands.ENABLE_BREAKPOINT = {
402
+ id: 'debug.editor.context.enableBreakpoint'
403
+ };
404
+ DebugEditorContextCommands.DISABLE_BREAKPOINT = {
405
+ id: 'debug.editor.context.disableBreakpoint'
406
+ };
407
+ DebugEditorContextCommands.REMOVE_LOGPOINT = {
408
+ id: 'debug.editor.context.logpoint.remove'
409
+ };
410
+ DebugEditorContextCommands.EDIT_LOGPOINT = {
411
+ id: 'debug.editor.context.logpoint.edit'
412
+ };
413
+ DebugEditorContextCommands.ENABLE_LOGPOINT = {
414
+ id: 'debug.editor.context.logpoint.enable'
415
+ };
416
+ DebugEditorContextCommands.DISABLE_LOGPOINT = {
417
+ id: 'debug.editor.context.logpoint.disable'
418
+ };
419
+ DebugEditorContextCommands.JUMP_TO_CURSOR = {
420
+ id: 'debug.editor.context.jumpToCursor'
421
+ };
422
+ DebugEditorContextCommands.RUN_TO_LINE = {
423
+ id: 'debug.editor.context.runToLine'
424
+ };
425
+ })(DebugEditorContextCommands || (exports.DebugEditorContextCommands = DebugEditorContextCommands = {}));
426
+ var DebugBreakpointWidgetCommands;
427
+ (function (DebugBreakpointWidgetCommands) {
428
+ DebugBreakpointWidgetCommands.ACCEPT = {
429
+ id: 'debug.breakpointWidget.accept'
430
+ };
431
+ DebugBreakpointWidgetCommands.CLOSE = {
432
+ id: 'debug.breakpointWidget.close'
433
+ };
434
+ })(DebugBreakpointWidgetCommands || (exports.DebugBreakpointWidgetCommands = DebugBreakpointWidgetCommands = {}));
435
+ let DebugFrontendApplicationContribution = class DebugFrontendApplicationContribution extends browser_1.AbstractViewContribution {
436
+ constructor() {
437
+ super({
438
+ widgetId: debug_widget_1.DebugWidget.ID,
439
+ widgetName: debug_widget_1.DebugWidget.LABEL,
440
+ defaultWidgetOptions: {
441
+ area: 'left',
442
+ rank: 400
443
+ },
444
+ toggleCommandId: 'debug:toggle',
445
+ toggleKeybinding: 'ctrlcmd+shift+d'
446
+ });
447
+ this.firstSessionStart = true;
448
+ }
449
+ async initializeLayout() {
450
+ await this.openView();
451
+ }
452
+ async onStart() {
453
+ this.manager.onDidCreateDebugSession(session => this.openSession(session, { reveal: false }));
454
+ this.manager.onDidStartDebugSession(session => {
455
+ const { noDebug } = session.configuration;
456
+ const openDebug = session.configuration.openDebug || this.preference['debug.openDebug'];
457
+ const internalConsoleOptions = session.configuration.internalConsoleOptions || this.preference['debug.internalConsoleOptions'];
458
+ if (internalConsoleOptions === 'openOnSessionStart' ||
459
+ (internalConsoleOptions === 'openOnFirstSessionStart' && this.firstSessionStart)) {
460
+ this.console.openView({
461
+ reveal: true,
462
+ activate: false,
463
+ });
464
+ }
465
+ const shouldOpenDebug = openDebug === 'openOnSessionStart' || (openDebug === 'openOnFirstSessionStart' && this.firstSessionStart);
466
+ // Do not open debug view when suppressed via configuration
467
+ if (!noDebug && !this.getOption(session, 'suppressDebugView') && shouldOpenDebug) {
468
+ this.openSession(session);
469
+ }
470
+ this.firstSessionStart = false;
471
+ });
472
+ this.manager.onDidStopDebugSession(session => {
473
+ const { openDebug } = session.configuration;
474
+ if (!this.getOption(session, 'suppressDebugView') && openDebug === 'openOnDebugBreak') {
475
+ this.openSession(session);
476
+ }
477
+ });
478
+ this.updateStatusBar();
479
+ this.manager.onDidChange(() => this.updateStatusBar());
480
+ this.schemaUpdater.update();
481
+ this.configurations.load();
482
+ this.breakpointManager.load();
483
+ this.watchManager.load();
484
+ }
485
+ onStop() {
486
+ this.configurations.save();
487
+ this.breakpointManager.save();
488
+ this.watchManager.save();
489
+ }
490
+ onWillStop() {
491
+ if (this.preference['debug.confirmOnExit'] === 'always' && this.manager.currentSession) {
492
+ return {
493
+ reason: 'active-debug-sessions',
494
+ action: async () => {
495
+ if (this.manager.currentSession) {
496
+ const msg = this.manager.sessions.length === 1
497
+ ? nls_1.nls.localizeByDefault('There is an active debug session, are you sure you want to stop it?')
498
+ : nls_1.nls.localizeByDefault('There are active debug sessions, are you sure you want to stop them?');
499
+ const safeToExit = await new browser_1.ConfirmDialog({
500
+ title: '',
501
+ msg,
502
+ ok: nls_1.nls.localizeByDefault('Stop Debugging'),
503
+ cancel: browser_1.Dialog.CANCEL,
504
+ }).open();
505
+ return safeToExit === true;
506
+ }
507
+ return true;
508
+ },
509
+ };
510
+ }
511
+ }
512
+ registerMenus(menus) {
513
+ super.registerMenus(menus);
514
+ const registerMenuActions = (menuPath, ...commands) => {
515
+ for (const [index, command] of commands.entries()) {
516
+ const label = command.label;
517
+ const debug = `${DebugCommands.DEBUG_CATEGORY}:`;
518
+ menus.registerMenuAction(menuPath, {
519
+ commandId: command.id,
520
+ label: label && label.startsWith(debug) && label.slice(debug.length).trimStart() || label,
521
+ icon: command.iconClass,
522
+ order: command.order || String.fromCharCode('a'.charCodeAt(0) + index)
523
+ });
524
+ }
525
+ };
526
+ menus.registerSubmenu(DebugMenus.DEBUG, nls_1.nls.localizeByDefault('Run'));
527
+ registerMenuActions(DebugMenus.DEBUG_CONTROLS, DebugCommands.START, DebugCommands.START_NO_DEBUG, DebugCommands.STOP, DebugCommands.RESTART);
528
+ registerMenuActions(DebugMenus.DEBUG_CONFIGURATION, DebugCommands.OPEN_CONFIGURATIONS, DebugCommands.ADD_CONFIGURATION);
529
+ registerMenuActions(DebugMenus.DEBUG_THREADS, DebugCommands.CONTINUE, DebugCommands.STEP_OVER, DebugCommands.STEP_INTO, DebugCommands.STEP_OUT, DebugCommands.PAUSE);
530
+ registerMenuActions(DebugMenus.DEBUG_SESSIONS, DebugCommands.CONTINUE_ALL, DebugCommands.PAUSE_ALL);
531
+ registerMenuActions(DebugMenus.DEBUG_BREAKPOINT, DebugCommands.TOGGLE_BREAKPOINT);
532
+ menus.registerSubmenu(DebugMenus.DEBUG_NEW_BREAKPOINT, nls_1.nls.localizeByDefault('New Breakpoint'));
533
+ registerMenuActions(DebugMenus.DEBUG_NEW_BREAKPOINT, DebugCommands.ADD_CONDITIONAL_BREAKPOINT, DebugCommands.INLINE_BREAKPOINT, DebugCommands.ADD_FUNCTION_BREAKPOINT, DebugCommands.ADD_LOGPOINT, DebugCommands.ADD_DATA_BREAKPOINT);
534
+ registerMenuActions(DebugMenus.DEBUG_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
535
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.CONTROL_MENU, { ...DebugCommands.PAUSE, ...DebugThreadContextCommands.PAUSE }, { ...DebugCommands.CONTINUE, ...DebugThreadContextCommands.CONTINUE }, { ...DebugCommands.STEP_OVER, ...DebugThreadContextCommands.STEP_OVER }, { ...DebugCommands.STEP_INTO, ...DebugThreadContextCommands.STEP_INTO }, { ...DebugCommands.STEP_OUT, ...DebugThreadContextCommands.STEP_OUT }, { ...DebugCommands.PAUSE_ALL, ...DebugSessionContextCommands.PAUSE_ALL }, { ...DebugCommands.CONTINUE_ALL, ...DebugSessionContextCommands.CONTINUE_ALL });
536
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, { ...DebugCommands.RESTART, ...DebugSessionContextCommands.RESTART }, { ...DebugCommands.STOP, ...DebugSessionContextCommands.STOP }, { ...DebugThreadContextCommands.TERMINATE, label: nls_1.nls.localizeByDefault('Terminate Thread') });
537
+ registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, { ...DebugSessionContextCommands.REVEAL, label: nls_1.nls.localize('theia/debug/reveal', 'Reveal') });
538
+ registerMenuActions(debug_stack_frames_widget_1.DebugStackFramesWidget.CONTEXT_MENU, DebugCommands.RESTART_FRAME, DebugCommands.COPY_CALL_STACK);
539
+ registerMenuActions(console_contribution_1.ConsoleContextMenu.CLIPBOARD, { ...DebugCommands.COPY_VARIABLE_VALUE, order: 'a1a' }, { ...DebugCommands.COPY_VARIABLE_AS_EXPRESSION, order: 'a1b' });
540
+ registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.EDIT_MENU, DebugCommands.SET_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
541
+ registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
542
+ registerMenuActions(debug_hover_widget_1.DebugHoverWidget.EDIT_MENU, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
543
+ registerMenuActions(debug_hover_widget_1.DebugHoverWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
544
+ registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, DebugCommands.EDIT_WATCH_EXPRESSION, DebugCommands.COPY_WATCH_EXPRESSION_VALUE);
545
+ registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, DebugCommands.REMOVE_WATCH_EXPRESSION, DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS);
546
+ registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.EDIT_MENU, DebugCommands.EDIT_BREAKPOINT, { ...DebugCommands.ADD_DATA_BREAKPOINT, label: nls_1.nls.localizeByDefault('Edit Address...'), originalLabel: 'Edit Address...' }, DebugCommands.EDIT_LOGPOINT, DebugCommands.EDIT_BREAKPOINT_CONDITION);
547
+ registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.REMOVE_MENU, DebugCommands.REMOVE_BREAKPOINT, DebugCommands.REMOVE_LOGPOINT, DebugCommands.REMOVE_SELECTED_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
548
+ registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.ENABLE_MENU, DebugCommands.ENABLE_SELECTED_BREAKPOINTS, DebugCommands.DISABLE_SELECTED_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS);
549
+ const DEBUG_EDITOR_CONTEXT_MENU_GROUP = [...browser_2.EDITOR_CONTEXT_MENU, '2_debug'];
550
+ registerMenuActions(DEBUG_EDITOR_CONTEXT_MENU_GROUP, DebugCommands.EVALUATE_IN_DEBUG_CONSOLE, DebugCommands.ADD_TO_WATCH, DebugCommands.JUMP_TO_CURSOR, DebugCommands.RUN_TO_CURSOR, DebugCommands.RUN_TO_LINE);
551
+ registerMenuActions([...debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, '1_breakpoint'], { ...DebugEditorContextCommands.ADD_BREAKPOINT, label: nls_1.nls.localizeByDefault('Add Breakpoint') }, { ...DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, label: DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }, { ...DebugEditorContextCommands.ADD_LOGPOINT, label: DebugCommands.ADD_LOGPOINT.label }, { ...DebugEditorContextCommands.REMOVE_BREAKPOINT, label: DebugCommands.REMOVE_BREAKPOINT.label }, { ...DebugEditorContextCommands.EDIT_BREAKPOINT, label: DebugCommands.EDIT_BREAKPOINT.label }, { ...DebugEditorContextCommands.ENABLE_BREAKPOINT, label: nlsEnableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.DISABLE_BREAKPOINT, label: nlsDisableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.REMOVE_LOGPOINT, label: DebugCommands.REMOVE_LOGPOINT.label }, { ...DebugEditorContextCommands.EDIT_LOGPOINT, label: DebugCommands.EDIT_LOGPOINT.label }, { ...DebugEditorContextCommands.ENABLE_LOGPOINT, label: nlsEnableBreakpoint('Logpoint') }, { ...DebugEditorContextCommands.DISABLE_LOGPOINT, label: nlsDisableBreakpoint('Logpoint') });
552
+ registerMenuActions([...debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, '2_control'], { ...DebugEditorContextCommands.JUMP_TO_CURSOR, label: nls_1.nls.localizeByDefault('Jump to Cursor') }, { ...DebugEditorContextCommands.RUN_TO_LINE, label: DebugCommands.RUN_TO_LINE.label });
553
+ menus.linkCompoundMenuNode({ newParentPath: browser_2.EDITOR_LINENUMBER_CONTEXT_MENU, submenuPath: debug_editor_model_1.DebugEditorModel.CONTEXT_MENU });
554
+ menus.registerSubmenu(debug_toolbar_widget_1.DebugToolBar.MENU, nls_1.nls.localize('theia/debug/debugToolbarMenu', 'Debug Toolbar Menu'));
555
+ }
556
+ registerCommands(registry) {
557
+ super.registerCommands(registry);
558
+ registry.registerCommand(DebugCommands.START, {
559
+ execute: (config) => {
560
+ const validConfig = debug_session_options_1.DebugSessionOptions.is(config) ? config : undefined;
561
+ return this.start(false, validConfig);
562
+ }
563
+ });
564
+ registry.registerCommand(DebugCommands.START_NO_DEBUG, {
565
+ execute: (config) => {
566
+ const validConfig = debug_session_options_1.DebugSessionOptions.is(config) ? config : undefined;
567
+ return this.start(true, validConfig);
568
+ }
569
+ });
570
+ registry.registerCommand(DebugCommands.STOP, {
571
+ execute: () => this.manager.terminateSession(),
572
+ isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
573
+ });
574
+ registry.registerCommand(DebugCommands.RESTART, {
575
+ execute: () => this.manager.restartSession(),
576
+ isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
577
+ });
578
+ registry.registerCommand(DebugCommands.OPEN_CONFIGURATIONS, {
579
+ execute: () => this.configurations.openConfiguration()
580
+ });
581
+ registry.registerCommand(DebugCommands.ADD_CONFIGURATION, {
582
+ execute: () => this.configurations.addConfiguration()
583
+ });
584
+ registry.registerCommand(DebugCommands.STEP_OVER, {
585
+ execute: () => this.manager.currentThread && this.manager.currentThread.stepOver(),
586
+ isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
587
+ });
588
+ registry.registerCommand(DebugCommands.STEP_INTO, {
589
+ execute: () => this.manager.currentThread && this.manager.currentThread.stepIn(),
590
+ isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
591
+ });
592
+ registry.registerCommand(DebugCommands.STEP_OUT, {
593
+ execute: () => this.manager.currentThread && this.manager.currentThread.stepOut(),
594
+ isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
595
+ });
596
+ registry.registerCommand(DebugCommands.CONTINUE, {
597
+ execute: () => {
598
+ if (this.manager.state === debug_session_1.DebugState.Stopped && this.manager.currentThread) {
599
+ this.manager.currentThread.continue();
600
+ }
601
+ },
602
+ // When there is a debug session, F5 should always be captured by this command
603
+ isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
604
+ });
605
+ registry.registerCommand(DebugCommands.PAUSE, {
606
+ execute: () => this.manager.currentThread && this.manager.currentThread.pause(),
607
+ isEnabled: () => this.manager.state === debug_session_1.DebugState.Running
608
+ });
609
+ registry.registerCommand(DebugCommands.PAUSE_ALL, {
610
+ execute: () => this.manager.currentSession && this.manager.currentSession.pauseAll(),
611
+ isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.runningThreads.next().value
612
+ });
613
+ registry.registerCommand(DebugCommands.CONTINUE_ALL, {
614
+ execute: () => this.manager.currentSession && this.manager.currentSession.continueAll(),
615
+ isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.stoppedThreads.next().value
616
+ });
617
+ registry.registerCommand(DebugThreadContextCommands.STEP_OVER, {
618
+ execute: () => this.selectedThread && this.selectedThread.stepOver(),
619
+ isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
620
+ isVisible: () => !!this.selectedThread
621
+ });
622
+ registry.registerCommand(DebugThreadContextCommands.STEP_INTO, {
623
+ execute: () => this.selectedThread && this.selectedThread.stepIn(),
624
+ isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
625
+ isVisible: () => !!this.selectedThread
626
+ });
627
+ registry.registerCommand(DebugThreadContextCommands.STEP_OUT, {
628
+ execute: () => this.selectedThread && this.selectedThread.stepOut(),
629
+ isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
630
+ isVisible: () => !!this.selectedThread
631
+ });
632
+ registry.registerCommand(DebugThreadContextCommands.CONTINUE, {
633
+ execute: () => this.selectedThread && this.selectedThread.continue(),
634
+ isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
635
+ isVisible: () => !!this.selectedThread && this.selectedThread.stopped,
636
+ });
637
+ registry.registerCommand(DebugThreadContextCommands.PAUSE, {
638
+ execute: () => this.selectedThread && this.selectedThread.pause(),
639
+ isEnabled: () => !!this.selectedThread && !this.selectedThread.stopped,
640
+ isVisible: () => !!this.selectedThread && !this.selectedThread.stopped,
641
+ });
642
+ registry.registerCommand(DebugThreadContextCommands.TERMINATE, {
643
+ execute: () => this.selectedThread && this.selectedThread.terminate(),
644
+ isEnabled: () => !!this.selectedThread && this.selectedThread.supportsTerminate,
645
+ isVisible: () => !!this.selectedThread && this.selectedThread.supportsTerminate
646
+ });
647
+ registry.registerCommand(DebugSessionContextCommands.STOP, {
648
+ execute: () => this.selectedSession && this.manager.terminateSession(this.selectedSession),
649
+ isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
650
+ isVisible: () => !this.selectedThread
651
+ });
652
+ registry.registerCommand(DebugSessionContextCommands.RESTART, {
653
+ execute: () => this.selectedSession && this.manager.restartSession(this.selectedSession),
654
+ isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
655
+ isVisible: () => !this.selectedThread
656
+ });
657
+ registry.registerCommand(DebugSessionContextCommands.CONTINUE_ALL, {
658
+ execute: () => this.selectedSession && this.selectedSession.continueAll(),
659
+ isEnabled: () => !!this.selectedSession && !!this.selectedSession.stoppedThreads.next().value,
660
+ isVisible: () => !this.selectedThread
661
+ });
662
+ registry.registerCommand(DebugSessionContextCommands.PAUSE_ALL, {
663
+ execute: () => this.selectedSession && this.selectedSession.pauseAll(),
664
+ isEnabled: () => !!this.selectedSession && !!this.selectedSession.runningThreads.next().value,
665
+ isVisible: () => !this.selectedThread
666
+ });
667
+ registry.registerCommand(DebugSessionContextCommands.REVEAL, {
668
+ execute: () => this.selectedSession && this.revealSession(this.selectedSession),
669
+ isEnabled: () => Boolean(this.selectedSession),
670
+ isVisible: () => !this.selectedThread && Boolean(this.selectedSession)
671
+ });
672
+ registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINT, {
673
+ execute: () => this.editors.toggleBreakpoint(),
674
+ isEnabled: () => !!this.editors.model
675
+ });
676
+ registry.registerCommand(DebugCommands.INLINE_BREAKPOINT, {
677
+ execute: () => this.editors.addInlineBreakpoint(),
678
+ isEnabled: () => !!this.editors.model && !this.editors.getInlineBreakpoint()
679
+ });
680
+ registry.registerCommand(DebugCommands.ADD_CONDITIONAL_BREAKPOINT, {
681
+ execute: () => this.editors.addBreakpoint('condition'),
682
+ isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
683
+ });
684
+ registry.registerCommand(DebugCommands.ADD_LOGPOINT, {
685
+ execute: () => this.editors.addBreakpoint('logMessage'),
686
+ isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
687
+ });
688
+ registry.registerCommand(DebugCommands.ADD_FUNCTION_BREAKPOINT, {
689
+ execute: async () => {
690
+ const { labelProvider, breakpointManager, editorManager } = this;
691
+ const options = { labelProvider, breakpoints: breakpointManager, editorManager };
692
+ await new debug_function_breakpoint_1.DebugFunctionBreakpoint(breakpoint_marker_1.FunctionBreakpoint.create({ name: '' }), options).open();
693
+ },
694
+ isEnabled: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget,
695
+ isVisible: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
696
+ });
697
+ registry.registerCommand(DebugCommands.ADD_DATA_BREAKPOINT, this.AddOrEditDataBreakpointAddress);
698
+ registry.registerCommand(DebugCommands.ENABLE_ALL_BREAKPOINTS, {
699
+ execute: () => this.breakpointManager.enableAllBreakpoints(true),
700
+ isEnabled: () => this.breakpointManager.hasBreakpoints()
701
+ });
702
+ registry.registerCommand(DebugCommands.ENABLE_SELECTED_BREAKPOINTS, {
703
+ execute: () => this.selectedBreakpoints.forEach(breakpoint => breakpoint.setEnabled(true)),
704
+ isVisible: () => this.selectedBreakpoints.some(breakpoint => !breakpoint.enabled),
705
+ isEnabled: () => this.selectedBreakpoints.some(breakpoint => !breakpoint.enabled)
706
+ });
707
+ registry.registerCommand(DebugCommands.DISABLE_ALL_BREAKPOINTS, {
708
+ execute: () => this.breakpointManager.enableAllBreakpoints(false),
709
+ isEnabled: () => this.breakpointManager.hasBreakpoints()
710
+ });
711
+ registry.registerCommand(DebugCommands.DISABLE_SELECTED_BREAKPOINTS, {
712
+ execute: () => this.selectedBreakpoints.forEach(breakpoint => breakpoint.setEnabled(false)),
713
+ isVisible: () => this.selectedBreakpoints.some(breakpoint => breakpoint.enabled),
714
+ isEnabled: () => this.selectedBreakpoints.some(breakpoint => breakpoint.enabled)
715
+ });
716
+ registry.registerCommand(DebugCommands.EDIT_BREAKPOINT, {
717
+ execute: async () => {
718
+ const { selectedBreakpoint, selectedFunctionBreakpoint } = this;
719
+ if (selectedBreakpoint) {
720
+ await this.editors.editBreakpoint(selectedBreakpoint);
721
+ }
722
+ else if (selectedFunctionBreakpoint) {
723
+ await selectedFunctionBreakpoint.open();
724
+ }
725
+ },
726
+ isEnabled: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint),
727
+ isVisible: () => this.selectedBreakpoints.length === 1 && (!!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint)
728
+ });
729
+ registry.registerCommand(DebugCommands.EDIT_LOGPOINT, {
730
+ execute: async () => {
731
+ const { selectedLogpoint } = this;
732
+ if (selectedLogpoint) {
733
+ await this.editors.editBreakpoint(selectedLogpoint);
734
+ }
735
+ },
736
+ isEnabled: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint,
737
+ isVisible: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint
738
+ });
739
+ registry.registerCommand(DebugCommands.EDIT_BREAKPOINT_CONDITION, {
740
+ execute: async () => {
741
+ const { selectedExceptionBreakpoint } = this;
742
+ if (selectedExceptionBreakpoint) {
743
+ await selectedExceptionBreakpoint.editCondition();
744
+ }
745
+ },
746
+ isEnabled: () => { var _a; return this.selectedBreakpoints.length === 1 && !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); },
747
+ isVisible: () => { var _a; return this.selectedBreakpoints.length === 1 && !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); }
748
+ });
749
+ registry.registerCommand(DebugCommands.REMOVE_BREAKPOINT, {
750
+ execute: () => {
751
+ const selectedBreakpoint = this.selectedSettableBreakpoint;
752
+ if (selectedBreakpoint) {
753
+ selectedBreakpoint.remove();
754
+ }
755
+ },
756
+ isEnabled: () => this.selectedBreakpoints.length === 1 && Boolean(this.selectedSettableBreakpoint),
757
+ isVisible: () => this.selectedBreakpoints.length === 1 && Boolean(this.selectedSettableBreakpoint),
758
+ });
759
+ registry.registerCommand(DebugCommands.REMOVE_LOGPOINT, {
760
+ execute: () => {
761
+ const { selectedLogpoint } = this;
762
+ if (selectedLogpoint) {
763
+ selectedLogpoint.remove();
764
+ }
765
+ },
766
+ isEnabled: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint,
767
+ isVisible: () => this.selectedBreakpoints.length === 1 && !!this.selectedLogpoint
768
+ });
769
+ registry.registerCommand(DebugCommands.REMOVE_ALL_BREAKPOINTS, {
770
+ execute: () => this.breakpointManager.removeBreakpoints(),
771
+ isEnabled: () => this.breakpointManager.hasBreakpoints(),
772
+ isVisible: widget => !(widget instanceof browser_1.Widget) || (widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget)
773
+ });
774
+ registry.registerCommand(DebugCommands.REMOVE_SELECTED_BREAKPOINTS, {
775
+ execute: () => this.selectedBreakpoints.forEach(breakpoint => breakpoint.remove()),
776
+ isEnabled: () => this.selectedBreakpoints.length > 1,
777
+ isVisible: widget => (!(widget instanceof browser_1.Widget) || (widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget)) && this.selectedBreakpoints.length > 1
778
+ });
779
+ registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINTS_ENABLED, {
780
+ execute: () => this.breakpointManager.breakpointsEnabled = !this.breakpointManager.breakpointsEnabled,
781
+ isVisible: arg => arg instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
782
+ });
783
+ registry.registerCommand(DebugCommands.SHOW_HOVER, {
784
+ execute: () => this.editors.showHover(),
785
+ isEnabled: () => this.editors.canShowHover()
786
+ });
787
+ registry.registerCommand(DebugCommands.EVALUATE_IN_DEBUG_CONSOLE, {
788
+ execute: async () => {
789
+ const { model } = this.editors;
790
+ if (model) {
791
+ const { editor } = model;
792
+ const { selection, document } = editor;
793
+ const value = document.getText(selection) || document.getLineContent(selection.start.line + 1).trim();
794
+ const consoleWidget = await this.console.openView({ reveal: true, activate: false });
795
+ await consoleWidget.execute(value);
796
+ }
797
+ },
798
+ isEnabled: () => !!this.editors.model && !!this.manager.currentFrame,
799
+ isVisible: () => !!this.editors.model && !!this.manager.currentFrame
800
+ });
801
+ registry.registerCommand(DebugCommands.ADD_TO_WATCH, {
802
+ execute: async () => {
803
+ var _a, _b;
804
+ const { model } = this.editors;
805
+ if (model) {
806
+ const { editor } = model;
807
+ const selection = editor.getControl().getSelection();
808
+ if (selection) {
809
+ const expression = ((_a = editor.getControl().getModel()) === null || _a === void 0 ? void 0 : _a.getValueInRange(selection)) ||
810
+ ((_b = (await this.expressionProvider.getEvaluatableExpression(editor, selection))) === null || _b === void 0 ? void 0 : _b.matchingExpression);
811
+ if (expression) {
812
+ this.watchManager.addWatchExpression(expression);
813
+ const watchWidget = this.widgetManager.tryGetWidget(debug_watch_widget_1.DebugWatchWidget.FACTORY_ID);
814
+ if (watchWidget) {
815
+ await this.shell.activateWidget(watchWidget.id);
816
+ }
817
+ }
818
+ }
819
+ }
820
+ },
821
+ isEnabled: () => !!this.editors.model && this.manager.inDebugMode,
822
+ isVisible: () => !!this.editors.model && this.manager.inDebugMode
823
+ });
824
+ registry.registerCommand(DebugCommands.JUMP_TO_CURSOR, {
825
+ execute: () => {
826
+ const model = this.editors.model;
827
+ if (model && this.manager.currentThread) {
828
+ this.manager.currentThread.jumpToCursor(model.editor.getResourceUri(), model.position);
829
+ }
830
+ },
831
+ isEnabled: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto,
832
+ isVisible: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto
833
+ });
834
+ registry.registerCommand(DebugCommands.RUN_TO_CURSOR, {
835
+ execute: async () => {
836
+ const { model } = this.editors;
837
+ if (model) {
838
+ const { editor, position } = model;
839
+ await this.runTo(editor.getResourceUri(), position.lineNumber, position.column);
840
+ }
841
+ },
842
+ isEnabled: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); },
843
+ isVisible: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); }
844
+ });
845
+ registry.registerCommand(DebugCommands.RUN_TO_LINE, {
846
+ execute: async () => {
847
+ const { model } = this.editors;
848
+ if (model) {
849
+ const { editor, position } = model;
850
+ await this.runTo(editor.getResourceUri(), position.lineNumber);
851
+ }
852
+ },
853
+ isEnabled: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); },
854
+ isVisible: () => { var _a; return !!this.editors.model && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); }
855
+ });
856
+ registry.registerCommand(DebugCommands.RESTART_FRAME, {
857
+ execute: () => this.selectedFrame && this.selectedFrame.restart(),
858
+ isEnabled: () => !!this.selectedFrame
859
+ });
860
+ registry.registerCommand(DebugCommands.COPY_CALL_STACK, {
861
+ execute: () => {
862
+ const { frames } = this;
863
+ const selection = document.getSelection();
864
+ if (frames && selection) {
865
+ selection.selectAllChildren(frames.node);
866
+ document.execCommand('copy');
867
+ }
868
+ },
869
+ isEnabled: () => document.queryCommandSupported('copy'),
870
+ isVisible: () => document.queryCommandSupported('copy')
871
+ });
872
+ registry.registerCommand(DebugCommands.SET_VARIABLE_VALUE, {
873
+ execute: () => this.selectedVariable && this.selectedVariable.open(),
874
+ isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable && !this.selectedVariable.readOnly,
875
+ isVisible: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable
876
+ });
877
+ registry.registerCommand(DebugCommands.COPY_VARIABLE_VALUE, {
878
+ execute: () => this.selectedVariable && this.selectedVariable.copyValue(),
879
+ isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue,
880
+ isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue
881
+ });
882
+ registry.registerCommand(DebugCommands.COPY_VARIABLE_AS_EXPRESSION, {
883
+ execute: () => this.selectedVariable && this.selectedVariable.copyAsExpression(),
884
+ isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression,
885
+ isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression
886
+ });
887
+ registry.registerCommand(DebugCommands.WATCH_VARIABLE, {
888
+ execute: () => {
889
+ var _a;
890
+ const evaluateName = (_a = this.selectedVariable) === null || _a === void 0 ? void 0 : _a.evaluateName;
891
+ if (evaluateName) {
892
+ this.watchManager.addWatchExpression(evaluateName);
893
+ }
894
+ },
895
+ isEnabled: () => { var _a; return !!((_a = this.selectedVariable) === null || _a === void 0 ? void 0 : _a.evaluateName); },
896
+ isVisible: () => { var _a; return !!((_a = this.selectedVariable) === null || _a === void 0 ? void 0 : _a.evaluateName); },
897
+ });
898
+ // Debug context menu commands
899
+ registry.registerCommand(DebugEditorContextCommands.ADD_BREAKPOINT, {
900
+ execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
901
+ isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
902
+ isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
903
+ });
904
+ registry.registerCommand(DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, {
905
+ execute: position => this.isPosition(position) && this.editors.addBreakpoint('condition', this.asPosition(position)),
906
+ isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
907
+ isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
908
+ });
909
+ registry.registerCommand(DebugEditorContextCommands.ADD_LOGPOINT, {
910
+ execute: position => this.isPosition(position) && this.editors.addBreakpoint('logMessage', this.asPosition(position)),
911
+ isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
912
+ isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
913
+ });
914
+ registry.registerCommand(DebugEditorContextCommands.REMOVE_BREAKPOINT, {
915
+ execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
916
+ isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
917
+ isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
918
+ });
919
+ registry.registerCommand(DebugEditorContextCommands.EDIT_BREAKPOINT, {
920
+ execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
921
+ isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
922
+ isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
923
+ });
924
+ registry.registerCommand(DebugEditorContextCommands.ENABLE_BREAKPOINT, {
925
+ execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
926
+ isEnabled: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false,
927
+ isVisible: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false
928
+ });
929
+ registry.registerCommand(DebugEditorContextCommands.DISABLE_BREAKPOINT, {
930
+ execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
931
+ isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position)),
932
+ isVisible: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position))
933
+ });
934
+ registry.registerCommand(DebugEditorContextCommands.REMOVE_LOGPOINT, {
935
+ execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
936
+ isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
937
+ isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
938
+ });
939
+ registry.registerCommand(DebugEditorContextCommands.EDIT_LOGPOINT, {
940
+ execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
941
+ isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
942
+ isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
943
+ });
944
+ registry.registerCommand(DebugEditorContextCommands.ENABLE_LOGPOINT, {
945
+ execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
946
+ isEnabled: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false,
947
+ isVisible: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false
948
+ });
949
+ registry.registerCommand(DebugEditorContextCommands.DISABLE_LOGPOINT, {
950
+ execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
951
+ isEnabled: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position)),
952
+ isVisible: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position))
953
+ });
954
+ registry.registerCommand(DebugEditorContextCommands.JUMP_TO_CURSOR, {
955
+ execute: position => {
956
+ if (this.isPosition(position) && this.editors.currentUri && this.manager.currentThread) {
957
+ this.manager.currentThread.jumpToCursor(this.editors.currentUri, this.asPosition(position));
958
+ }
959
+ },
960
+ isEnabled: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto,
961
+ isVisible: () => !!this.manager.currentThread && this.manager.currentThread.supportsGoto
962
+ });
963
+ registry.registerCommand(DebugEditorContextCommands.RUN_TO_LINE, {
964
+ execute: async (position) => {
965
+ if (this.isPosition(position)) {
966
+ const { currentUri } = this.editors;
967
+ if (currentUri) {
968
+ await this.runTo(currentUri, position.lineNumber);
969
+ }
970
+ }
971
+ },
972
+ isEnabled: position => { var _a; return this.isPosition(position) && !!this.editors.currentUri && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); },
973
+ isVisible: position => { var _a; return this.isPosition(position) && !!this.editors.currentUri && !!((_a = this.manager.currentThread) === null || _a === void 0 ? void 0 : _a.stopped); }
974
+ });
975
+ registry.registerCommand(DebugBreakpointWidgetCommands.ACCEPT, {
976
+ execute: () => this.editors.acceptBreakpoint()
977
+ });
978
+ registry.registerCommand(DebugBreakpointWidgetCommands.CLOSE, {
979
+ execute: () => this.editors.closeBreakpoint()
980
+ });
981
+ registry.registerCommand(DebugCommands.ADD_WATCH_EXPRESSION, {
982
+ execute: widget => {
983
+ if (widget instanceof browser_1.Widget) {
984
+ if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
985
+ widget.viewModel.addWatchExpression();
986
+ }
987
+ }
988
+ else if (this.watch) {
989
+ this.watch.viewModel.addWatchExpression();
990
+ }
991
+ },
992
+ isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
993
+ isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
994
+ });
995
+ registry.registerCommand(DebugCommands.EDIT_WATCH_EXPRESSION, {
996
+ execute: () => {
997
+ const { watchExpression } = this;
998
+ if (watchExpression) {
999
+ watchExpression.open();
1000
+ }
1001
+ },
1002
+ isEnabled: () => !!this.watchExpression,
1003
+ isVisible: () => !!this.watchExpression
1004
+ });
1005
+ registry.registerCommand(DebugCommands.COPY_WATCH_EXPRESSION_VALUE, {
1006
+ execute: () => this.watchExpression && this.watchExpression.copyValue(),
1007
+ isEnabled: () => !!this.watchExpression && this.watchExpression.supportCopyValue,
1008
+ isVisible: () => !!this.watchExpression && this.watchExpression.supportCopyValue
1009
+ });
1010
+ registry.registerCommand(DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS, {
1011
+ execute: widget => {
1012
+ if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
1013
+ const root = widget.model.root;
1014
+ widget.model.collapseAll(browser_1.CompositeTreeNode.is(root) ? root : undefined);
1015
+ }
1016
+ },
1017
+ isEnabled: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget,
1018
+ isVisible: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget
1019
+ });
1020
+ registry.registerCommand(DebugCommands.REMOVE_WATCH_EXPRESSION, {
1021
+ execute: () => {
1022
+ const { watch, watchExpression } = this;
1023
+ if (watch && watchExpression) {
1024
+ watch.viewModel.removeWatchExpression(watchExpression);
1025
+ }
1026
+ },
1027
+ isEnabled: () => !!this.watchExpression,
1028
+ isVisible: () => !!this.watchExpression
1029
+ });
1030
+ registry.registerCommand(DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS, {
1031
+ execute: widget => {
1032
+ if (widget instanceof browser_1.Widget) {
1033
+ if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
1034
+ widget.viewModel.removeWatchExpressions();
1035
+ }
1036
+ }
1037
+ else if (this.watch) {
1038
+ this.watch.viewModel.removeWatchExpressions();
1039
+ }
1040
+ },
1041
+ isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
1042
+ isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
1043
+ });
1044
+ }
1045
+ registerKeybindings(keybindings) {
1046
+ super.registerKeybindings(keybindings);
1047
+ keybindings.registerKeybinding({
1048
+ command: DebugCommands.START.id,
1049
+ keybinding: 'f5',
1050
+ when: '!inDebugMode'
1051
+ });
1052
+ keybindings.registerKeybinding({
1053
+ command: DebugCommands.START_NO_DEBUG.id,
1054
+ keybinding: 'ctrl+f5',
1055
+ when: '!inDebugMode'
1056
+ });
1057
+ keybindings.registerKeybinding({
1058
+ command: DebugCommands.STOP.id,
1059
+ keybinding: 'shift+f5',
1060
+ when: 'inDebugMode'
1061
+ });
1062
+ keybindings.registerKeybinding({
1063
+ command: DebugCommands.RESTART.id,
1064
+ keybinding: 'shift+ctrlcmd+f5',
1065
+ when: 'inDebugMode'
1066
+ });
1067
+ keybindings.registerKeybinding({
1068
+ command: DebugCommands.STEP_OVER.id,
1069
+ keybinding: 'f10',
1070
+ when: 'inDebugMode'
1071
+ });
1072
+ keybindings.registerKeybinding({
1073
+ command: DebugCommands.STEP_INTO.id,
1074
+ keybinding: 'f11',
1075
+ when: 'inDebugMode'
1076
+ });
1077
+ keybindings.registerKeybinding({
1078
+ command: DebugCommands.STEP_OUT.id,
1079
+ keybinding: 'shift+f11',
1080
+ when: 'inDebugMode'
1081
+ });
1082
+ keybindings.registerKeybinding({
1083
+ command: DebugCommands.CONTINUE.id,
1084
+ keybinding: 'f5',
1085
+ when: 'inDebugMode'
1086
+ });
1087
+ keybindings.registerKeybinding({
1088
+ command: DebugCommands.PAUSE.id,
1089
+ keybinding: 'f6',
1090
+ when: 'inDebugMode'
1091
+ });
1092
+ keybindings.registerKeybinding({
1093
+ command: DebugCommands.TOGGLE_BREAKPOINT.id,
1094
+ keybinding: 'f9',
1095
+ when: 'editorTextFocus'
1096
+ });
1097
+ keybindings.registerKeybinding({
1098
+ command: DebugCommands.INLINE_BREAKPOINT.id,
1099
+ keybinding: 'shift+f9',
1100
+ when: 'editorTextFocus'
1101
+ });
1102
+ keybindings.registerKeybinding({
1103
+ command: DebugBreakpointWidgetCommands.ACCEPT.id,
1104
+ keybinding: 'enter',
1105
+ when: 'breakpointWidgetFocus && !suggestWidgetVisible'
1106
+ });
1107
+ keybindings.registerKeybinding({
1108
+ command: DebugBreakpointWidgetCommands.CLOSE.id,
1109
+ keybinding: 'esc',
1110
+ when: 'isBreakpointWidgetVisible || (breakpointWidgetFocus && !suggestWidgetVisible)'
1111
+ });
1112
+ }
1113
+ registerToolbarItems(toolbar) {
1114
+ const onDidChangeToggleBreakpointsEnabled = new common_1.Emitter();
1115
+ const toggleBreakpointsEnabled = {
1116
+ id: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
1117
+ command: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
1118
+ icon: (0, browser_1.codicon)('activate-breakpoints'),
1119
+ onDidChange: onDidChangeToggleBreakpointsEnabled.event,
1120
+ priority: 1
1121
+ };
1122
+ const updateToggleBreakpointsEnabled = () => {
1123
+ const activateBreakpoints = nls_1.nls.localizeByDefault('Enable All Breakpoints');
1124
+ const deactivateBreakpoints = nls_1.nls.localizeByDefault('Disable All Breakpoints');
1125
+ const tooltip = this.breakpointManager.breakpointsEnabled ? deactivateBreakpoints : activateBreakpoints;
1126
+ if (toggleBreakpointsEnabled.tooltip !== tooltip) {
1127
+ toggleBreakpointsEnabled.tooltip = tooltip;
1128
+ onDidChangeToggleBreakpointsEnabled.fire(undefined);
1129
+ }
1130
+ };
1131
+ toolbar.registerItem({
1132
+ id: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
1133
+ command: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
1134
+ icon: (0, browser_1.codicon)('add'),
1135
+ tooltip: DebugCommands.ADD_FUNCTION_BREAKPOINT.label
1136
+ });
1137
+ toolbar.registerItem({
1138
+ id: DebugCommands.ADD_DATA_BREAKPOINT.id,
1139
+ command: DebugCommands.ADD_DATA_BREAKPOINT.id,
1140
+ icon: (0, browser_1.codicon)('variable-group'),
1141
+ tooltip: DebugCommands.ADD_DATA_BREAKPOINT.label,
1142
+ onDidChange: this.manager.onDidStopDebugSession
1143
+ });
1144
+ updateToggleBreakpointsEnabled();
1145
+ this.breakpointManager.onDidChangeBreakpoints(updateToggleBreakpointsEnabled);
1146
+ toolbar.registerItem(toggleBreakpointsEnabled);
1147
+ toolbar.registerItem({
1148
+ id: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
1149
+ command: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
1150
+ icon: (0, browser_1.codicon)('close-all'),
1151
+ priority: 2
1152
+ });
1153
+ toolbar.registerItem({
1154
+ id: DebugCommands.ADD_WATCH_EXPRESSION.id,
1155
+ command: DebugCommands.ADD_WATCH_EXPRESSION.id,
1156
+ icon: (0, browser_1.codicon)('add'),
1157
+ tooltip: DebugCommands.ADD_WATCH_EXPRESSION.label
1158
+ });
1159
+ toolbar.registerItem({
1160
+ id: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
1161
+ command: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
1162
+ icon: (0, browser_1.codicon)('collapse-all'),
1163
+ tooltip: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.label,
1164
+ priority: 1
1165
+ });
1166
+ toolbar.registerItem({
1167
+ id: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
1168
+ command: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
1169
+ icon: (0, browser_1.codicon)('close-all'),
1170
+ tooltip: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.label,
1171
+ priority: 2
1172
+ });
1173
+ }
1174
+ async openSession(session, options) {
1175
+ const { reveal } = {
1176
+ reveal: true,
1177
+ ...options
1178
+ };
1179
+ const debugWidget = await this.openView({ reveal });
1180
+ debugWidget.sessionManager.currentSession = session;
1181
+ return debugWidget['sessionWidget'];
1182
+ }
1183
+ revealSession(session) {
1184
+ var _a;
1185
+ const widget = (_a = this.tryGetWidget()) === null || _a === void 0 ? void 0 : _a['sessionWidget'];
1186
+ if (widget) {
1187
+ this.shell.revealWidget(widget.id);
1188
+ }
1189
+ return widget;
1190
+ }
1191
+ async start(noDebug, debugSessionOptions) {
1192
+ let current = debugSessionOptions || this.configurations.current;
1193
+ // If no configurations are currently present, create the `launch.json` and prompt users to select the config.
1194
+ if (!current) {
1195
+ await this.configurations.addConfiguration();
1196
+ return;
1197
+ }
1198
+ if (noDebug !== undefined) {
1199
+ if (current.configuration) {
1200
+ current = {
1201
+ ...current,
1202
+ configuration: {
1203
+ ...current.configuration,
1204
+ noDebug
1205
+ }
1206
+ };
1207
+ }
1208
+ else {
1209
+ current = {
1210
+ ...current,
1211
+ noDebug
1212
+ };
1213
+ }
1214
+ }
1215
+ await this.manager.start(current);
1216
+ }
1217
+ async runTo(uri, line, column) {
1218
+ const thread = this.manager.currentThread;
1219
+ if (!thread) {
1220
+ return;
1221
+ }
1222
+ const checkThread = () => {
1223
+ if (thread.stopped && thread === this.manager.currentThread) {
1224
+ return true;
1225
+ }
1226
+ console.warn('Cannot run to the specified location. The current thread has changed or is not stopped.');
1227
+ return false;
1228
+ };
1229
+ if (!checkThread()) {
1230
+ return;
1231
+ }
1232
+ const breakpoint = breakpoint_marker_1.SourceBreakpoint.create(uri, { line, column });
1233
+ let shouldRemoveBreakpoint = this.breakpointManager.addBreakpoint(breakpoint);
1234
+ const removeBreakpoint = () => {
1235
+ const breakpoints = this.breakpointManager.getBreakpoints(uri);
1236
+ const newBreakpoints = breakpoints.filter(bp => bp.id !== breakpoint.id);
1237
+ if (breakpoints.length !== newBreakpoints.length) {
1238
+ this.breakpointManager.setBreakpoints(uri, newBreakpoints);
1239
+ }
1240
+ };
1241
+ try {
1242
+ const sessionBreakpoint = await this.verifyBreakpoint(breakpoint, thread.session);
1243
+ if (!checkThread()) {
1244
+ return;
1245
+ }
1246
+ if (!sessionBreakpoint || !sessionBreakpoint.installed || !sessionBreakpoint.verified) {
1247
+ this.messageService.warn(nls_1.nls.localize('theia/debug/cannotRunToThisLocation', 'Could not run the current thread to the specified location.'));
1248
+ return;
1249
+ }
1250
+ const rawBreakpoint = sessionBreakpoint.raw; // an installed breakpoint always has the underlying raw breakpoint
1251
+ if (rawBreakpoint.line !== line || (column && rawBreakpoint.column !== column)) {
1252
+ const shouldRun = await new browser_1.ConfirmDialog({
1253
+ title: nls_1.nls.localize('theia/debug/confirmRunToShiftedPosition_title', 'Cannot run the current thread to exactly the specified location'),
1254
+ msg: nls_1.nls.localize('theia/debug/confirmRunToShiftedPosition_msg', 'The target position will be shifted to Ln {0}, Col {1}. Run anyway?', rawBreakpoint.line, rawBreakpoint.column || 1),
1255
+ ok: browser_1.Dialog.YES,
1256
+ cancel: browser_1.Dialog.NO
1257
+ }).open();
1258
+ if (!shouldRun || !checkThread()) {
1259
+ return;
1260
+ }
1261
+ }
1262
+ if (shouldRemoveBreakpoint) {
1263
+ common_1.Event.toPromise(common_1.Event.filter(common_1.Event.any(this.manager.onDidStopDebugSession, this.manager.onDidDestroyDebugSession), session => session === thread.session)).then(removeBreakpoint);
1264
+ }
1265
+ await thread.continue();
1266
+ shouldRemoveBreakpoint = false;
1267
+ }
1268
+ finally {
1269
+ if (shouldRemoveBreakpoint) {
1270
+ removeBreakpoint();
1271
+ }
1272
+ }
1273
+ }
1274
+ async verifyBreakpoint(breakpoint, session, timeout = 2000) {
1275
+ let sessionBreakpoint = session.getBreakpoint(breakpoint.id);
1276
+ if (!sessionBreakpoint || !sessionBreakpoint.installed || !sessionBreakpoint.verified) {
1277
+ try {
1278
+ await (0, promise_util_1.waitForEvent)(common_1.Event.filter(session.onDidChangeBreakpoints, () => {
1279
+ sessionBreakpoint = session.getBreakpoint(breakpoint.id);
1280
+ return !!sessionBreakpoint && sessionBreakpoint.installed && sessionBreakpoint.verified;
1281
+ }), timeout); // wait up to `timeout` ms for the breakpoint to become installed and verified
1282
+ }
1283
+ catch (e) {
1284
+ if (!(e instanceof common_1.CancellationError)) { // ignore the `CancellationError` on timeout
1285
+ throw e;
1286
+ }
1287
+ }
1288
+ }
1289
+ return sessionBreakpoint;
1290
+ }
1291
+ get threads() {
1292
+ const { currentWidget } = this.shell;
1293
+ return currentWidget instanceof debug_threads_widget_1.DebugThreadsWidget && currentWidget || undefined;
1294
+ }
1295
+ get selectedSession() {
1296
+ const { threads } = this;
1297
+ return threads && threads.selectedElement instanceof debug_session_1.DebugSession && threads.selectedElement || undefined;
1298
+ }
1299
+ get selectedThread() {
1300
+ const { threads } = this;
1301
+ return threads && threads.selectedElement instanceof debug_thread_1.DebugThread && threads.selectedElement || undefined;
1302
+ }
1303
+ get frames() {
1304
+ const { currentWidget } = this.shell;
1305
+ return currentWidget instanceof debug_stack_frames_widget_1.DebugStackFramesWidget && currentWidget || undefined;
1306
+ }
1307
+ get selectedFrame() {
1308
+ const { frames } = this;
1309
+ return frames && frames.selectedElement instanceof debug_stack_frame_1.DebugStackFrame && frames.selectedElement || undefined;
1310
+ }
1311
+ get breakpoints() {
1312
+ const { currentWidget } = this.shell;
1313
+ return currentWidget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget && currentWidget || undefined;
1314
+ }
1315
+ get selectedAnyBreakpoint() {
1316
+ const { breakpoints } = this;
1317
+ const selectedElement = breakpoints && breakpoints.selectedElement;
1318
+ return selectedElement instanceof debug_breakpoint_1.DebugBreakpoint ? selectedElement : undefined;
1319
+ }
1320
+ get selectedBreakpoint() {
1321
+ const breakpoint = this.selectedAnyBreakpoint;
1322
+ return breakpoint && breakpoint instanceof debug_source_breakpoint_1.DebugSourceBreakpoint && !breakpoint.logMessage ? breakpoint : undefined;
1323
+ }
1324
+ get selectedBreakpoints() {
1325
+ const { breakpoints } = this;
1326
+ return breakpoints && breakpoints.model.selectedNodes
1327
+ .filter(source_tree_1.TreeElementNode.is)
1328
+ .map(node => node.element)
1329
+ .filter(element => element instanceof debug_breakpoint_1.DebugBreakpoint) || [];
1330
+ }
1331
+ get selectedLogpoint() {
1332
+ const breakpoint = this.selectedAnyBreakpoint;
1333
+ return breakpoint && breakpoint instanceof debug_source_breakpoint_1.DebugSourceBreakpoint && !!breakpoint.logMessage ? breakpoint : undefined;
1334
+ }
1335
+ get selectedFunctionBreakpoint() {
1336
+ const breakpoint = this.selectedAnyBreakpoint;
1337
+ return breakpoint && breakpoint instanceof debug_function_breakpoint_1.DebugFunctionBreakpoint ? breakpoint : undefined;
1338
+ }
1339
+ get selectedInstructionBreakpoint() {
1340
+ if (this.selectedAnyBreakpoint instanceof debug_instruction_breakpoint_1.DebugInstructionBreakpoint) {
1341
+ return this.selectedAnyBreakpoint;
1342
+ }
1343
+ }
1344
+ get selectedExceptionBreakpoint() {
1345
+ const { breakpoints } = this;
1346
+ const selectedElement = breakpoints && breakpoints.selectedElement;
1347
+ return selectedElement instanceof debug_exception_breakpoint_1.DebugExceptionBreakpoint ? selectedElement : undefined;
1348
+ }
1349
+ get selectedSettableBreakpoint() {
1350
+ const selected = this.selectedAnyBreakpoint;
1351
+ if (selected instanceof debug_function_breakpoint_1.DebugFunctionBreakpoint || selected instanceof debug_instruction_breakpoint_1.DebugInstructionBreakpoint || selected instanceof debug_source_breakpoint_1.DebugSourceBreakpoint) {
1352
+ return selected;
1353
+ }
1354
+ }
1355
+ get consoleWidget() {
1356
+ const { currentWidget } = this.shell;
1357
+ return currentWidget instanceof console_widget_1.ConsoleWidget && currentWidget.id === debug_console_contribution_1.DebugConsoleContribution.options.id && currentWidget || undefined;
1358
+ }
1359
+ get variables() {
1360
+ const { currentWidget } = this.shell;
1361
+ return currentWidget instanceof debug_variables_widget_1.DebugVariablesWidget && currentWidget || undefined;
1362
+ }
1363
+ get variablesSource() {
1364
+ var _a, _b, _c;
1365
+ const hover = (_a = this.editors.model) === null || _a === void 0 ? void 0 : _a.hover;
1366
+ if (hover === null || hover === void 0 ? void 0 : hover.isVisible) {
1367
+ return hover;
1368
+ }
1369
+ return (_b = this.variables) !== null && _b !== void 0 ? _b : (_c = this.consoleWidget) === null || _c === void 0 ? void 0 : _c.content;
1370
+ }
1371
+ get selectedVariable() {
1372
+ const { variablesSource } = this;
1373
+ return variablesSource && variablesSource.selectedElement instanceof debug_console_items_1.DebugVariable && variablesSource.selectedElement || undefined;
1374
+ }
1375
+ get watch() {
1376
+ const { currentWidget } = this.shell;
1377
+ return currentWidget instanceof debug_watch_widget_1.DebugWatchWidget && currentWidget || undefined;
1378
+ }
1379
+ get watchExpression() {
1380
+ const { watch } = this;
1381
+ return watch && watch.selectedElement instanceof debug_watch_expression_1.DebugWatchExpression && watch.selectedElement || undefined;
1382
+ }
1383
+ isPosition(position) {
1384
+ return monaco.Position.isIPosition(position);
1385
+ }
1386
+ asPosition(position) {
1387
+ return monaco.Position.lift(position);
1388
+ }
1389
+ registerColors(colors) {
1390
+ colors.register(
1391
+ // Debug colors should be aligned with https://code.visualstudio.com/api/references/theme-color#debug-colors
1392
+ {
1393
+ id: 'editor.stackFrameHighlightBackground',
1394
+ defaults: {
1395
+ dark: '#ffff0033',
1396
+ light: '#ffff6673',
1397
+ hcDark: '#fff600',
1398
+ hcLight: '#ffff6673'
1399
+ }, description: nls_1.nls.localizeByDefault('Background color for the highlight of line at the top stack frame position.')
1400
+ }, {
1401
+ id: 'editor.focusedStackFrameHighlightBackground',
1402
+ defaults: {
1403
+ dark: '#7abd7a4d',
1404
+ light: '#cee7ce73',
1405
+ hcDark: '#cee7ce',
1406
+ hcLight: '#cee7ce73'
1407
+ }, description: nls_1.nls.localizeByDefault('Background color for the highlight of line at focused stack frame position.')
1408
+ },
1409
+ // Status bar colors should be aligned with debugging colors from https://code.visualstudio.com/api/references/theme-color#status-bar-colors
1410
+ {
1411
+ id: 'statusBar.debuggingBackground', defaults: {
1412
+ dark: '#CC6633',
1413
+ light: '#CC6633',
1414
+ hcDark: '#CC6633',
1415
+ hcLight: '#B5200D'
1416
+ }, description: nls_1.nls.localizeByDefault('Status bar background color when a program is being debugged. The status bar is shown in the bottom of the window')
1417
+ }, {
1418
+ id: 'statusBar.debuggingForeground', defaults: {
1419
+ dark: 'statusBar.foreground',
1420
+ light: 'statusBar.foreground',
1421
+ hcDark: 'statusBar.foreground',
1422
+ hcLight: 'statusBar.foreground'
1423
+ }, description: nls_1.nls.localizeByDefault('Status bar foreground color when a program is being debugged. The status bar is shown in the bottom of the window')
1424
+ }, {
1425
+ id: 'statusBar.debuggingBorder', defaults: {
1426
+ dark: 'statusBar.border',
1427
+ light: 'statusBar.border',
1428
+ hcDark: 'statusBar.border',
1429
+ hcLight: 'statusBar.border'
1430
+ }, description: nls_1.nls.localizeByDefault('Status bar border color separating to the sidebar and editor when a program is being debugged. The status bar is shown in the bottom of the window')
1431
+ },
1432
+ // Debug Exception Widget colors should be aligned with
1433
+ // https://github.com/microsoft/vscode/blob/ff5f581425da6230b6f9216ecf19abf6c9d285a6/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts#L23
1434
+ {
1435
+ id: 'debugExceptionWidget.border', defaults: {
1436
+ dark: '#a31515',
1437
+ light: '#a31515',
1438
+ hcDark: '#a31515',
1439
+ hcLight: '#a31515'
1440
+ }, description: nls_1.nls.localizeByDefault('Exception widget border color.'),
1441
+ }, {
1442
+ id: 'debugExceptionWidget.background', defaults: {
1443
+ dark: '#420b0d',
1444
+ light: '#f1dfde',
1445
+ hcDark: '#420b0d',
1446
+ hcLight: '#f1dfde'
1447
+ }, description: nls_1.nls.localizeByDefault('Exception widget background color.')
1448
+ },
1449
+ // Debug Icon colors should be aligned with
1450
+ // https://code.visualstudio.com/api/references/theme-color#debug-icons-colors
1451
+ {
1452
+ id: 'debugIcon.breakpointForeground', defaults: {
1453
+ dark: '#E51400',
1454
+ light: '#E51400',
1455
+ hcDark: '#E51400',
1456
+ hcLight: '#E51400'
1457
+ },
1458
+ description: nls_1.nls.localizeByDefault('Icon color for breakpoints.')
1459
+ }, {
1460
+ id: 'debugIcon.breakpointDisabledForeground', defaults: {
1461
+ dark: '#848484',
1462
+ light: '#848484',
1463
+ hcDark: '#848484',
1464
+ hcLight: '#848484'
1465
+ },
1466
+ description: nls_1.nls.localizeByDefault('Icon color for disabled breakpoints.')
1467
+ }, {
1468
+ id: 'debugIcon.breakpointUnverifiedForeground', defaults: {
1469
+ dark: '#848484',
1470
+ light: '#848484',
1471
+ hcDark: '#848484',
1472
+ hcLight: '#848484'
1473
+ },
1474
+ description: nls_1.nls.localizeByDefault('Icon color for unverified breakpoints.')
1475
+ }, {
1476
+ id: 'debugIcon.breakpointCurrentStackframeForeground', defaults: {
1477
+ dark: '#FFCC00',
1478
+ light: '#BE8700',
1479
+ hcDark: '#FFCC00',
1480
+ hcLight: '#BE8700'
1481
+ },
1482
+ description: nls_1.nls.localizeByDefault('Icon color for the current breakpoint stack frame.')
1483
+ }, {
1484
+ id: 'debugIcon.breakpointStackframeForeground', defaults: {
1485
+ dark: '#89D185',
1486
+ light: '#89D185',
1487
+ hcDark: '#89D185',
1488
+ hcLight: '#89D185'
1489
+ },
1490
+ description: nls_1.nls.localizeByDefault('Icon color for all breakpoint stack frames.')
1491
+ }, {
1492
+ id: 'debugIcon.startForeground', defaults: {
1493
+ dark: '#89D185',
1494
+ light: '#388A34',
1495
+ hcDark: '#89D185',
1496
+ hcLight: '#388A34'
1497
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for start debugging.')
1498
+ }, {
1499
+ id: 'debugIcon.pauseForeground', defaults: {
1500
+ dark: '#75BEFF',
1501
+ light: '#007ACC',
1502
+ hcDark: '#75BEFF',
1503
+ hcLight: '#007ACC'
1504
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for pause.')
1505
+ }, {
1506
+ id: 'debugIcon.stopForeground', defaults: {
1507
+ dark: '#F48771',
1508
+ light: '#A1260D',
1509
+ hcDark: '#F48771',
1510
+ hcLight: '#A1260D'
1511
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for stop.')
1512
+ }, {
1513
+ id: 'debugIcon.disconnectForeground', defaults: {
1514
+ dark: '#F48771',
1515
+ light: '#A1260D',
1516
+ hcDark: '#F48771',
1517
+ hcLight: '#A1260D'
1518
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for disconnect.')
1519
+ }, {
1520
+ id: 'debugIcon.restartForeground', defaults: {
1521
+ dark: '#89D185',
1522
+ light: '#388A34',
1523
+ hcDark: '#89D185',
1524
+ hcLight: '#388A34'
1525
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for restart.')
1526
+ }, {
1527
+ id: 'debugIcon.stepOverForeground', defaults: {
1528
+ dark: '#75BEFF',
1529
+ light: '#007ACC',
1530
+ hcDark: '#75BEFF',
1531
+ hcLight: '#007ACC',
1532
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for step over.')
1533
+ }, {
1534
+ id: 'debugIcon.stepIntoForeground', defaults: {
1535
+ dark: '#75BEFF',
1536
+ light: '#007ACC',
1537
+ hcDark: '#75BEFF',
1538
+ hcLight: '#007ACC'
1539
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for step into.')
1540
+ }, {
1541
+ id: 'debugIcon.stepOutForeground', defaults: {
1542
+ dark: '#75BEFF',
1543
+ light: '#007ACC',
1544
+ hcDark: '#75BEFF',
1545
+ hcLight: '#007ACC',
1546
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for step over.')
1547
+ }, {
1548
+ id: 'debugIcon.continueForeground', defaults: {
1549
+ dark: '#75BEFF',
1550
+ light: '#007ACC',
1551
+ hcDark: '#75BEFF',
1552
+ hcLight: '#007ACC'
1553
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for continue.')
1554
+ }, {
1555
+ id: 'debugIcon.stepBackForeground', defaults: {
1556
+ dark: '#75BEFF',
1557
+ light: '#007ACC',
1558
+ hcDark: '#75BEFF',
1559
+ hcLight: '#007ACC'
1560
+ }, description: nls_1.nls.localizeByDefault('Debug toolbar icon for step back.')
1561
+ }, {
1562
+ id: 'debugConsole.infoForeground', defaults: {
1563
+ dark: 'editorInfo.foreground',
1564
+ light: 'editorInfo.foreground',
1565
+ hcDark: 'foreground',
1566
+ hcLight: 'foreground'
1567
+ }, description: 'Foreground color for info messages in debug REPL console.' // this description is present in VS Code, but is not currently localized there
1568
+ }, {
1569
+ id: 'debugConsole.warningForeground', defaults: {
1570
+ dark: 'editorWarning.foreground',
1571
+ light: 'editorWarning.foreground',
1572
+ hcDark: '#008000',
1573
+ hcLight: 'editorWarning.foreground'
1574
+ },
1575
+ description: 'Foreground color for warning messages in debug REPL console.' // this description is present in VS Code, but is not currently localized there
1576
+ }, {
1577
+ id: 'debugConsole.errorForeground', defaults: {
1578
+ dark: 'errorForeground',
1579
+ light: 'errorForeground',
1580
+ hcDark: 'errorForeground',
1581
+ hcLight: 'errorForeground'
1582
+ },
1583
+ description: 'Foreground color for error messages in debug REPL console.', // this description is present in VS Code, but is not currently localized there
1584
+ }, {
1585
+ id: 'debugConsole.sourceForeground', defaults: {
1586
+ dark: 'foreground',
1587
+ light: 'foreground',
1588
+ hcDark: 'foreground',
1589
+ hcLight: 'foreground'
1590
+ },
1591
+ description: 'Foreground color for source filenames in debug REPL console.', // this description is present in VS Code, but is not currently localized there
1592
+ }, {
1593
+ id: 'debugConsoleInputIcon.foreground', defaults: {
1594
+ dark: 'foreground',
1595
+ light: 'foreground',
1596
+ hcDark: 'foreground',
1597
+ hcLight: 'foreground'
1598
+ },
1599
+ description: 'Foreground color for debug console input marker icon.' // this description is present in VS Code, but is not currently localized there
1600
+ });
1601
+ }
1602
+ updateStatusBar() {
1603
+ if (this.debuggingStatusBar === document.body.classList.contains('theia-mod-debugging')) {
1604
+ return;
1605
+ }
1606
+ document.body.classList.toggle('theia-mod-debugging');
1607
+ }
1608
+ get debuggingStatusBar() {
1609
+ if (this.manager.state < debug_session_1.DebugState.Running) {
1610
+ return false;
1611
+ }
1612
+ const session = this.manager.currentSession;
1613
+ if (session) {
1614
+ if (session.configuration.noDebug) {
1615
+ return false;
1616
+ }
1617
+ if (this.getOption(session, 'suppressDebugStatusbar')) {
1618
+ return false;
1619
+ }
1620
+ }
1621
+ return true;
1622
+ }
1623
+ getOption(session, option) {
1624
+ // If session is undefined there will be no option
1625
+ if (!session) {
1626
+ return false;
1627
+ }
1628
+ // If undefined take the value of the parent
1629
+ if (option in session.configuration && session.configuration[option] !== undefined) {
1630
+ return session.configuration[option];
1631
+ }
1632
+ return this.getOption(session.parentSession, option);
1633
+ }
1634
+ };
1635
+ exports.DebugFrontendApplicationContribution = DebugFrontendApplicationContribution;
1636
+ tslib_1.__decorate([
1637
+ (0, inversify_1.inject)(debug_service_1.DebugService),
1638
+ tslib_1.__metadata("design:type", Object)
1639
+ ], DebugFrontendApplicationContribution.prototype, "debug", void 0);
1640
+ tslib_1.__decorate([
1641
+ (0, inversify_1.inject)(debug_session_manager_1.DebugSessionManager),
1642
+ tslib_1.__metadata("design:type", debug_session_manager_1.DebugSessionManager)
1643
+ ], DebugFrontendApplicationContribution.prototype, "manager", void 0);
1644
+ tslib_1.__decorate([
1645
+ (0, inversify_1.inject)(debug_configuration_manager_1.DebugConfigurationManager),
1646
+ tslib_1.__metadata("design:type", debug_configuration_manager_1.DebugConfigurationManager)
1647
+ ], DebugFrontendApplicationContribution.prototype, "configurations", void 0);
1648
+ tslib_1.__decorate([
1649
+ (0, inversify_1.inject)(breakpoint_manager_1.BreakpointManager),
1650
+ tslib_1.__metadata("design:type", breakpoint_manager_1.BreakpointManager)
1651
+ ], DebugFrontendApplicationContribution.prototype, "breakpointManager", void 0);
1652
+ tslib_1.__decorate([
1653
+ (0, inversify_1.inject)(debug_editor_service_1.DebugEditorService),
1654
+ tslib_1.__metadata("design:type", debug_editor_service_1.DebugEditorService)
1655
+ ], DebugFrontendApplicationContribution.prototype, "editors", void 0);
1656
+ tslib_1.__decorate([
1657
+ (0, inversify_1.inject)(debug_console_contribution_1.DebugConsoleContribution),
1658
+ tslib_1.__metadata("design:type", debug_console_contribution_1.DebugConsoleContribution)
1659
+ ], DebugFrontendApplicationContribution.prototype, "console", void 0);
1660
+ tslib_1.__decorate([
1661
+ (0, inversify_1.inject)(debug_schema_updater_1.DebugSchemaUpdater),
1662
+ tslib_1.__metadata("design:type", debug_schema_updater_1.DebugSchemaUpdater)
1663
+ ], DebugFrontendApplicationContribution.prototype, "schemaUpdater", void 0);
1664
+ tslib_1.__decorate([
1665
+ (0, inversify_1.inject)(debug_preferences_1.DebugPreferences),
1666
+ tslib_1.__metadata("design:type", Object)
1667
+ ], DebugFrontendApplicationContribution.prototype, "preference", void 0);
1668
+ tslib_1.__decorate([
1669
+ (0, inversify_1.inject)(debug_watch_manager_1.DebugWatchManager),
1670
+ tslib_1.__metadata("design:type", debug_watch_manager_1.DebugWatchManager)
1671
+ ], DebugFrontendApplicationContribution.prototype, "watchManager", void 0);
1672
+ tslib_1.__decorate([
1673
+ (0, inversify_1.inject)(debug_expression_provider_1.DebugExpressionProvider),
1674
+ tslib_1.__metadata("design:type", debug_expression_provider_1.DebugExpressionProvider)
1675
+ ], DebugFrontendApplicationContribution.prototype, "expressionProvider", void 0);
1676
+ tslib_1.__decorate([
1677
+ (0, inversify_1.inject)(browser_1.LabelProvider),
1678
+ tslib_1.__metadata("design:type", browser_1.LabelProvider)
1679
+ ], DebugFrontendApplicationContribution.prototype, "labelProvider", void 0);
1680
+ tslib_1.__decorate([
1681
+ (0, inversify_1.inject)(browser_2.EditorManager),
1682
+ tslib_1.__metadata("design:type", browser_2.EditorManager)
1683
+ ], DebugFrontendApplicationContribution.prototype, "editorManager", void 0);
1684
+ tslib_1.__decorate([
1685
+ (0, inversify_1.inject)(common_1.MessageService),
1686
+ tslib_1.__metadata("design:type", common_1.MessageService)
1687
+ ], DebugFrontendApplicationContribution.prototype, "messageService", void 0);
1688
+ tslib_1.__decorate([
1689
+ (0, inversify_1.inject)(debug_data_breakpoint_actions_1.AddOrEditDataBreakpointAddress),
1690
+ tslib_1.__metadata("design:type", debug_data_breakpoint_actions_1.AddOrEditDataBreakpointAddress)
1691
+ ], DebugFrontendApplicationContribution.prototype, "AddOrEditDataBreakpointAddress", void 0);
1692
+ exports.DebugFrontendApplicationContribution = DebugFrontendApplicationContribution = tslib_1.__decorate([
1693
+ (0, inversify_1.injectable)(),
1694
+ tslib_1.__metadata("design:paramtypes", [])
1695
+ ], DebugFrontendApplicationContribution);
1696
+ //# sourceMappingURL=debug-frontend-application-contribution.js.map