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

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 (346) hide show
  1. package/README.md +1 -1
  2. package/package.json +15 -15
  3. package/src/browser/breakpoint/breakpoint-manager.ts +69 -16
  4. package/src/browser/breakpoint/breakpoint-marker.ts +38 -0
  5. package/src/browser/breakpoint/debug-data-breakpoint-actions.ts +170 -0
  6. package/src/browser/console/debug-console-items.tsx +5 -1
  7. package/src/browser/debug-frontend-application-contribution.ts +52 -0
  8. package/src/browser/debug-frontend-module.ts +4 -0
  9. package/src/browser/debug-session-manager.ts +18 -0
  10. package/src/browser/debug-session.tsx +31 -0
  11. package/src/browser/editor/debug-expression-provider.ts +49 -4
  12. package/src/browser/editor/debug-hover-widget.ts +7 -52
  13. package/src/browser/model/debug-data-breakpoint.tsx +79 -0
  14. package/src/browser/style/index.css +4 -0
  15. package/src/browser/view/debug-breakpoints-source.tsx +4 -10
  16. package/src/browser/view/debug-stack-frames-widget.ts +6 -2
  17. package/src/browser/view/debug-variables-widget.ts +99 -2
  18. package/src/browser/view/debug-view-model.ts +5 -0
  19. package/lib/browser/breakpoint/breakpoint-manager.d.ts +0 -71
  20. package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +0 -1
  21. package/lib/browser/breakpoint/breakpoint-manager.js +0 -321
  22. package/lib/browser/breakpoint/breakpoint-manager.js.map +0 -1
  23. package/lib/browser/breakpoint/breakpoint-marker.d.ts +0 -42
  24. package/lib/browser/breakpoint/breakpoint-marker.d.ts.map +0 -1
  25. package/lib/browser/breakpoint/breakpoint-marker.js +0 -88
  26. package/lib/browser/breakpoint/breakpoint-marker.js.map +0 -1
  27. package/lib/browser/console/debug-console-contribution.d.ts +0 -45
  28. package/lib/browser/console/debug-console-contribution.d.ts.map +0 -1
  29. package/lib/browser/console/debug-console-contribution.js +0 -233
  30. package/lib/browser/console/debug-console-contribution.js.map +0 -1
  31. package/lib/browser/console/debug-console-items.d.ts +0 -97
  32. package/lib/browser/console/debug-console-items.d.ts.map +0 -1
  33. package/lib/browser/console/debug-console-items.js +0 -343
  34. package/lib/browser/console/debug-console-items.js.map +0 -1
  35. package/lib/browser/console/debug-console-session.d.ts +0 -32
  36. package/lib/browser/console/debug-console-session.d.ts.map +0 -1
  37. package/lib/browser/console/debug-console-session.js +0 -192
  38. package/lib/browser/console/debug-console-session.js.map +0 -1
  39. package/lib/browser/debug-call-stack-item-type-key.d.ts +0 -4
  40. package/lib/browser/debug-call-stack-item-type-key.d.ts.map +0 -1
  41. package/lib/browser/debug-call-stack-item-type-key.js +0 -20
  42. package/lib/browser/debug-call-stack-item-type-key.js.map +0 -1
  43. package/lib/browser/debug-configuration-manager.d.ts +0 -103
  44. package/lib/browser/debug-configuration-manager.d.ts.map +0 -1
  45. package/lib/browser/debug-configuration-manager.js +0 -545
  46. package/lib/browser/debug-configuration-manager.js.map +0 -1
  47. package/lib/browser/debug-configuration-model.d.ts +0 -30
  48. package/lib/browser/debug-configuration-model.d.ts.map +0 -1
  49. package/lib/browser/debug-configuration-model.js +0 -80
  50. package/lib/browser/debug-configuration-model.js.map +0 -1
  51. package/lib/browser/debug-contribution.d.ts +0 -23
  52. package/lib/browser/debug-contribution.d.ts.map +0 -1
  53. package/lib/browser/debug-contribution.js +0 -20
  54. package/lib/browser/debug-contribution.js.map +0 -1
  55. package/lib/browser/debug-frontend-application-contribution.d.ts +0 -246
  56. package/lib/browser/debug-frontend-application-contribution.d.ts.map +0 -1
  57. package/lib/browser/debug-frontend-application-contribution.js +0 -1645
  58. package/lib/browser/debug-frontend-application-contribution.js.map +0 -1
  59. package/lib/browser/debug-frontend-module.d.ts +0 -5
  60. package/lib/browser/debug-frontend-module.d.ts.map +0 -1
  61. package/lib/browser/debug-frontend-module.js +0 -108
  62. package/lib/browser/debug-frontend-module.js.map +0 -1
  63. package/lib/browser/debug-package.spec.d.ts +0 -1
  64. package/lib/browser/debug-package.spec.d.ts.map +0 -1
  65. package/lib/browser/debug-package.spec.js +0 -19
  66. package/lib/browser/debug-package.spec.js.map +0 -1
  67. package/lib/browser/debug-prefix-configuration.d.ts +0 -52
  68. package/lib/browser/debug-prefix-configuration.d.ts.map +0 -1
  69. package/lib/browser/debug-prefix-configuration.js +0 -202
  70. package/lib/browser/debug-prefix-configuration.js.map +0 -1
  71. package/lib/browser/debug-resource.d.ts +0 -15
  72. package/lib/browser/debug-resource.d.ts.map +0 -1
  73. package/lib/browser/debug-resource.js +0 -58
  74. package/lib/browser/debug-resource.js.map +0 -1
  75. package/lib/browser/debug-schema-updater.d.ts +0 -14
  76. package/lib/browser/debug-schema-updater.d.ts.map +0 -1
  77. package/lib/browser/debug-schema-updater.js +0 -161
  78. package/lib/browser/debug-schema-updater.js.map +0 -1
  79. package/lib/browser/debug-session-configuration-label-provider.d.ts +0 -11
  80. package/lib/browser/debug-session-configuration-label-provider.d.ts.map +0 -1
  81. package/lib/browser/debug-session-configuration-label-provider.js +0 -48
  82. package/lib/browser/debug-session-configuration-label-provider.js.map +0 -1
  83. package/lib/browser/debug-session-configuration-label-provider.spec.d.ts +0 -2
  84. package/lib/browser/debug-session-configuration-label-provider.spec.d.ts.map +0 -1
  85. package/lib/browser/debug-session-configuration-label-provider.spec.js +0 -84
  86. package/lib/browser/debug-session-configuration-label-provider.spec.js.map +0 -1
  87. package/lib/browser/debug-session-connection.d.ts +0 -111
  88. package/lib/browser/debug-session-connection.d.ts.map +0 -1
  89. package/lib/browser/debug-session-connection.js +0 -259
  90. package/lib/browser/debug-session-connection.js.map +0 -1
  91. package/lib/browser/debug-session-contribution.d.ts +0 -77
  92. package/lib/browser/debug-session-contribution.d.ts.map +0 -1
  93. package/lib/browser/debug-session-contribution.js +0 -143
  94. package/lib/browser/debug-session-contribution.js.map +0 -1
  95. package/lib/browser/debug-session-manager.d.ts +0 -138
  96. package/lib/browser/debug-session-manager.d.ts.map +0 -1
  97. package/lib/browser/debug-session-manager.js +0 -620
  98. package/lib/browser/debug-session-manager.js.map +0 -1
  99. package/lib/browser/debug-session-options.d.ts +0 -56
  100. package/lib/browser/debug-session-options.d.ts.map +0 -1
  101. package/lib/browser/debug-session-options.js +0 -92
  102. package/lib/browser/debug-session-options.js.map +0 -1
  103. package/lib/browser/debug-session.d.ts +0 -192
  104. package/lib/browser/debug-session.d.ts.map +0 -1
  105. package/lib/browser/debug-session.js +0 -913
  106. package/lib/browser/debug-session.js.map +0 -1
  107. package/lib/browser/debug-tab-bar-decorator.d.ts +0 -17
  108. package/lib/browser/debug-tab-bar-decorator.d.ts.map +0 -1
  109. package/lib/browser/debug-tab-bar-decorator.js +0 -63
  110. package/lib/browser/debug-tab-bar-decorator.js.map +0 -1
  111. package/lib/browser/debug-watch-manager.d.ts +0 -22
  112. package/lib/browser/debug-watch-manager.d.ts.map +0 -1
  113. package/lib/browser/debug-watch-manager.js +0 -86
  114. package/lib/browser/debug-watch-manager.js.map +0 -1
  115. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts +0 -7
  116. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts.map +0 -1
  117. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js +0 -39
  118. package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js.map +0 -1
  119. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts +0 -20
  120. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts.map +0 -1
  121. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js +0 -111
  122. package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js.map +0 -1
  123. package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts +0 -25
  124. package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts.map +0 -1
  125. package/lib/browser/disassembly-view/disassembly-view-contribution.js +0 -124
  126. package/lib/browser/disassembly-view/disassembly-view-contribution.js.map +0 -1
  127. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts +0 -39
  128. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts.map +0 -1
  129. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js +0 -213
  130. package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js.map +0 -1
  131. package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts +0 -16
  132. package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts.map +0 -1
  133. package/lib/browser/disassembly-view/disassembly-view-table-delegate.js +0 -39
  134. package/lib/browser/disassembly-view/disassembly-view-table-delegate.js.map +0 -1
  135. package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts +0 -38
  136. package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts.map +0 -1
  137. package/lib/browser/disassembly-view/disassembly-view-utilities.js +0 -18
  138. package/lib/browser/disassembly-view/disassembly-view-utilities.js.map +0 -1
  139. package/lib/browser/disassembly-view/disassembly-view-widget.d.ts +0 -61
  140. package/lib/browser/disassembly-view/disassembly-view-widget.d.ts.map +0 -1
  141. package/lib/browser/disassembly-view/disassembly-view-widget.js +0 -446
  142. package/lib/browser/disassembly-view/disassembly-view-widget.js.map +0 -1
  143. package/lib/browser/editor/debug-breakpoint-widget.d.ts +0 -58
  144. package/lib/browser/editor/debug-breakpoint-widget.d.ts.map +0 -1
  145. package/lib/browser/editor/debug-breakpoint-widget.js +0 -270
  146. package/lib/browser/editor/debug-breakpoint-widget.js.map +0 -1
  147. package/lib/browser/editor/debug-editor-model.d.ts +0 -87
  148. package/lib/browser/editor/debug-editor-model.d.ts.map +0 -1
  149. package/lib/browser/editor/debug-editor-model.js +0 -499
  150. package/lib/browser/editor/debug-editor-model.js.map +0 -1
  151. package/lib/browser/editor/debug-editor-service.d.ts +0 -38
  152. package/lib/browser/editor/debug-editor-service.d.ts.map +0 -1
  153. package/lib/browser/editor/debug-editor-service.js +0 -183
  154. package/lib/browser/editor/debug-editor-service.js.map +0 -1
  155. package/lib/browser/editor/debug-editor.d.ts +0 -4
  156. package/lib/browser/editor/debug-editor.d.ts.map +0 -1
  157. package/lib/browser/editor/debug-editor.js +0 -20
  158. package/lib/browser/editor/debug-editor.js.map +0 -1
  159. package/lib/browser/editor/debug-exception-widget.d.ts +0 -30
  160. package/lib/browser/editor/debug-exception-widget.d.ts.map +0 -1
  161. package/lib/browser/editor/debug-exception-widget.js +0 -107
  162. package/lib/browser/editor/debug-exception-widget.js.map +0 -1
  163. package/lib/browser/editor/debug-expression-provider.d.ts +0 -12
  164. package/lib/browser/editor/debug-expression-provider.d.ts.map +0 -1
  165. package/lib/browser/editor/debug-expression-provider.js +0 -77
  166. package/lib/browser/editor/debug-expression-provider.js.map +0 -1
  167. package/lib/browser/editor/debug-hover-source.d.ts +0 -19
  168. package/lib/browser/editor/debug-hover-source.d.ts.map +0 -1
  169. package/lib/browser/editor/debug-hover-source.js +0 -110
  170. package/lib/browser/editor/debug-hover-source.js.map +0 -1
  171. package/lib/browser/editor/debug-hover-widget.d.ts +0 -61
  172. package/lib/browser/editor/debug-hover-widget.d.ts.map +0 -1
  173. package/lib/browser/editor/debug-hover-widget.js +0 -304
  174. package/lib/browser/editor/debug-hover-widget.js.map +0 -1
  175. package/lib/browser/editor/debug-inline-value-decorator.d.ts +0 -20
  176. package/lib/browser/editor/debug-inline-value-decorator.d.ts.map +0 -1
  177. package/lib/browser/editor/debug-inline-value-decorator.js +0 -326
  178. package/lib/browser/editor/debug-inline-value-decorator.js.map +0 -1
  179. package/lib/browser/model/debug-breakpoint.d.ts +0 -48
  180. package/lib/browser/model/debug-breakpoint.d.ts.map +0 -1
  181. package/lib/browser/model/debug-breakpoint.js +0 -111
  182. package/lib/browser/model/debug-breakpoint.js.map +0 -1
  183. package/lib/browser/model/debug-function-breakpoint.d.ts +0 -19
  184. package/lib/browser/model/debug-function-breakpoint.d.ts.map +0 -1
  185. package/lib/browser/model/debug-function-breakpoint.js +0 -93
  186. package/lib/browser/model/debug-function-breakpoint.js.map +0 -1
  187. package/lib/browser/model/debug-instruction-breakpoint.d.ts +0 -15
  188. package/lib/browser/model/debug-instruction-breakpoint.d.ts.map +0 -1
  189. package/lib/browser/model/debug-instruction-breakpoint.js +0 -66
  190. package/lib/browser/model/debug-instruction-breakpoint.js.map +0 -1
  191. package/lib/browser/model/debug-source-breakpoint.d.ts +0 -39
  192. package/lib/browser/model/debug-source-breakpoint.d.ts.map +0 -1
  193. package/lib/browser/model/debug-source-breakpoint.js +0 -219
  194. package/lib/browser/model/debug-source-breakpoint.js.map +0 -1
  195. package/lib/browser/model/debug-source.d.ts +0 -25
  196. package/lib/browser/model/debug-source.d.ts.map +0 -1
  197. package/lib/browser/model/debug-source.js +0 -81
  198. package/lib/browser/model/debug-source.js.map +0 -1
  199. package/lib/browser/model/debug-stack-frame.d.ts +0 -45
  200. package/lib/browser/model/debug-stack-frame.d.ts.map +0 -1
  201. package/lib/browser/model/debug-stack-frame.js +0 -157
  202. package/lib/browser/model/debug-stack-frame.js.map +0 -1
  203. package/lib/browser/model/debug-thread.d.ts +0 -68
  204. package/lib/browser/model/debug-thread.d.ts.map +0 -1
  205. package/lib/browser/model/debug-thread.js +0 -262
  206. package/lib/browser/model/debug-thread.js.map +0 -1
  207. package/lib/browser/view/debug-action.d.ts +0 -18
  208. package/lib/browser/view/debug-action.d.ts.map +0 -1
  209. package/lib/browser/view/debug-action.js +0 -44
  210. package/lib/browser/view/debug-action.js.map +0 -1
  211. package/lib/browser/view/debug-breakpoints-source.d.ts +0 -10
  212. package/lib/browser/view/debug-breakpoints-source.d.ts.map +0 -1
  213. package/lib/browser/view/debug-breakpoints-source.js +0 -63
  214. package/lib/browser/view/debug-breakpoints-source.js.map +0 -1
  215. package/lib/browser/view/debug-breakpoints-widget.d.ts +0 -23
  216. package/lib/browser/view/debug-breakpoints-widget.d.ts.map +0 -1
  217. package/lib/browser/view/debug-breakpoints-widget.js +0 -81
  218. package/lib/browser/view/debug-breakpoints-widget.js.map +0 -1
  219. package/lib/browser/view/debug-configuration-select.d.ts +0 -67
  220. package/lib/browser/view/debug-configuration-select.d.ts.map +0 -1
  221. package/lib/browser/view/debug-configuration-select.js +0 -212
  222. package/lib/browser/view/debug-configuration-select.js.map +0 -1
  223. package/lib/browser/view/debug-configuration-widget.d.ts +0 -33
  224. package/lib/browser/view/debug-configuration-widget.d.ts.map +0 -1
  225. package/lib/browser/view/debug-configuration-widget.js +0 -137
  226. package/lib/browser/view/debug-configuration-widget.js.map +0 -1
  227. package/lib/browser/view/debug-exception-breakpoint.d.ts +0 -15
  228. package/lib/browser/view/debug-exception-breakpoint.d.ts.map +0 -1
  229. package/lib/browser/view/debug-exception-breakpoint.js +0 -62
  230. package/lib/browser/view/debug-exception-breakpoint.js.map +0 -1
  231. package/lib/browser/view/debug-session-widget.d.ts +0 -29
  232. package/lib/browser/view/debug-session-widget.d.ts.map +0 -1
  233. package/lib/browser/view/debug-session-widget.js +0 -127
  234. package/lib/browser/view/debug-session-widget.js.map +0 -1
  235. package/lib/browser/view/debug-stack-frames-source.d.ts +0 -18
  236. package/lib/browser/view/debug-stack-frames-source.d.ts.map +0 -1
  237. package/lib/browser/view/debug-stack-frames-source.js +0 -83
  238. package/lib/browser/view/debug-stack-frames-source.js.map +0 -1
  239. package/lib/browser/view/debug-stack-frames-widget.d.ts +0 -25
  240. package/lib/browser/view/debug-stack-frames-widget.d.ts.map +0 -1
  241. package/lib/browser/view/debug-stack-frames-widget.js +0 -147
  242. package/lib/browser/view/debug-stack-frames-widget.js.map +0 -1
  243. package/lib/browser/view/debug-threads-source.d.ts +0 -9
  244. package/lib/browser/view/debug-threads-source.d.ts.map +0 -1
  245. package/lib/browser/view/debug-threads-source.js +0 -56
  246. package/lib/browser/view/debug-threads-source.js.map +0 -1
  247. package/lib/browser/view/debug-threads-widget.d.ts +0 -27
  248. package/lib/browser/view/debug-threads-widget.d.ts.map +0 -1
  249. package/lib/browser/view/debug-threads-widget.js +0 -139
  250. package/lib/browser/view/debug-threads-widget.js.map +0 -1
  251. package/lib/browser/view/debug-toolbar-widget.d.ts +0 -34
  252. package/lib/browser/view/debug-toolbar-widget.d.ts.map +0 -1
  253. package/lib/browser/view/debug-toolbar-widget.js +0 -139
  254. package/lib/browser/view/debug-toolbar-widget.js.map +0 -1
  255. package/lib/browser/view/debug-variables-source.d.ts +0 -10
  256. package/lib/browser/view/debug-variables-source.d.ts.map +0 -1
  257. package/lib/browser/view/debug-variables-source.js +0 -53
  258. package/lib/browser/view/debug-variables-source.js.map +0 -1
  259. package/lib/browser/view/debug-variables-widget.d.ts +0 -17
  260. package/lib/browser/view/debug-variables-widget.d.ts.map +0 -1
  261. package/lib/browser/view/debug-variables-widget.js +0 -71
  262. package/lib/browser/view/debug-variables-widget.js.map +0 -1
  263. package/lib/browser/view/debug-view-model.d.ts +0 -53
  264. package/lib/browser/view/debug-view-model.d.ts.map +0 -1
  265. package/lib/browser/view/debug-view-model.js +0 -212
  266. package/lib/browser/view/debug-view-model.js.map +0 -1
  267. package/lib/browser/view/debug-watch-expression.d.ts +0 -33
  268. package/lib/browser/view/debug-watch-expression.d.ts.map +0 -1
  269. package/lib/browser/view/debug-watch-expression.js +0 -93
  270. package/lib/browser/view/debug-watch-expression.js.map +0 -1
  271. package/lib/browser/view/debug-watch-source.d.ts +0 -10
  272. package/lib/browser/view/debug-watch-source.d.ts.map +0 -1
  273. package/lib/browser/view/debug-watch-source.js +0 -51
  274. package/lib/browser/view/debug-watch-source.js.map +0 -1
  275. package/lib/browser/view/debug-watch-widget.d.ts +0 -17
  276. package/lib/browser/view/debug-watch-widget.d.ts.map +0 -1
  277. package/lib/browser/view/debug-watch-widget.js +0 -71
  278. package/lib/browser/view/debug-watch-widget.js.map +0 -1
  279. package/lib/browser/view/debug-widget.d.ts +0 -24
  280. package/lib/browser/view/debug-widget.d.ts.map +0 -1
  281. package/lib/browser/view/debug-widget.js +0 -101
  282. package/lib/browser/view/debug-widget.js.map +0 -1
  283. package/lib/common/debug-adapter-contribution-registry.d.ts +0 -60
  284. package/lib/common/debug-adapter-contribution-registry.d.ts.map +0 -1
  285. package/lib/common/debug-adapter-contribution-registry.js +0 -205
  286. package/lib/common/debug-adapter-contribution-registry.js.map +0 -1
  287. package/lib/common/debug-adapter-session.d.ts +0 -19
  288. package/lib/common/debug-adapter-session.d.ts.map +0 -1
  289. package/lib/common/debug-adapter-session.js +0 -79
  290. package/lib/common/debug-adapter-session.js.map +0 -1
  291. package/lib/common/debug-common.d.ts +0 -2
  292. package/lib/common/debug-common.d.ts.map +0 -1
  293. package/lib/common/debug-common.js +0 -21
  294. package/lib/common/debug-common.js.map +0 -1
  295. package/lib/common/debug-compound.d.ts +0 -15
  296. package/lib/common/debug-compound.d.ts.map +0 -1
  297. package/lib/common/debug-compound.js +0 -28
  298. package/lib/common/debug-compound.js.map +0 -1
  299. package/lib/common/debug-configuration.d.ts +0 -77
  300. package/lib/common/debug-configuration.d.ts.map +0 -1
  301. package/lib/common/debug-configuration.js +0 -32
  302. package/lib/common/debug-configuration.js.map +0 -1
  303. package/lib/common/debug-model.d.ts +0 -153
  304. package/lib/common/debug-model.d.ts.map +0 -1
  305. package/lib/common/debug-model.js +0 -36
  306. package/lib/common/debug-model.js.map +0 -1
  307. package/lib/common/debug-preferences.d.ts +0 -18
  308. package/lib/common/debug-preferences.d.ts.map +0 -1
  309. package/lib/common/debug-preferences.js +0 -89
  310. package/lib/common/debug-preferences.js.map +0 -1
  311. package/lib/common/debug-service.d.ts +0 -124
  312. package/lib/common/debug-service.d.ts.map +0 -1
  313. package/lib/common/debug-service.js +0 -67
  314. package/lib/common/debug-service.js.map +0 -1
  315. package/lib/common/debug-uri-utils.d.ts +0 -24
  316. package/lib/common/debug-uri-utils.d.ts.map +0 -1
  317. package/lib/common/debug-uri-utils.js +0 -27
  318. package/lib/common/debug-uri-utils.js.map +0 -1
  319. package/lib/common/inline-debug-adapter.d.ts +0 -19
  320. package/lib/common/inline-debug-adapter.d.ts.map +0 -1
  321. package/lib/common/inline-debug-adapter.js +0 -45
  322. package/lib/common/inline-debug-adapter.js.map +0 -1
  323. package/lib/common/launch-preferences.d.ts +0 -6
  324. package/lib/common/launch-preferences.d.ts.map +0 -1
  325. package/lib/common/launch-preferences.js +0 -37
  326. package/lib/common/launch-preferences.js.map +0 -1
  327. package/lib/node/debug-adapter-factory.d.ts +0 -20
  328. package/lib/node/debug-adapter-factory.d.ts.map +0 -1
  329. package/lib/node/debug-adapter-factory.js +0 -89
  330. package/lib/node/debug-adapter-factory.js.map +0 -1
  331. package/lib/node/debug-adapter-session-manager.d.ts +0 -38
  332. package/lib/node/debug-adapter-session-manager.d.ts.map +0 -1
  333. package/lib/node/debug-adapter-session-manager.js +0 -104
  334. package/lib/node/debug-adapter-session-manager.js.map +0 -1
  335. package/lib/node/debug-backend-module.d.ts +0 -4
  336. package/lib/node/debug-backend-module.d.ts.map +0 -1
  337. package/lib/node/debug-backend-module.js +0 -45
  338. package/lib/node/debug-backend-module.js.map +0 -1
  339. package/lib/node/debug-service-impl.d.ts +0 -31
  340. package/lib/node/debug-service-impl.d.ts.map +0 -1
  341. package/lib/node/debug-service-impl.js +0 -117
  342. package/lib/node/debug-service-impl.js.map +0 -1
  343. package/lib/node/stream-debug-adapter.d.ts +0 -41
  344. package/lib/node/stream-debug-adapter.d.ts.map +0 -1
  345. package/lib/node/stream-debug-adapter.js +0 -113
  346. package/lib/node/stream-debug-adapter.js.map +0 -1
@@ -1,103 +0,0 @@
1
- import URI from '@theia/core/lib/common/uri';
2
- import { Emitter, Event, WaitUntilEvent } from '@theia/core/lib/common/event';
3
- import { EditorManager, EditorWidget } from '@theia/editor/lib/browser';
4
- import { LabelProvider, StorageService } from '@theia/core/lib/browser';
5
- import { QuickPickService } from '@theia/core/lib/common/quick-pick-service';
6
- import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
7
- import { DebugConfigurationModel } from './debug-configuration-model';
8
- import { DebugSessionOptions, DynamicDebugConfigurationSessionOptions } from './debug-session-options';
9
- import { DebugService } from '../common/debug-service';
10
- import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service';
11
- import { DebugConfiguration } from '../common/debug-common';
12
- import { WorkspaceVariableContribution } from '@theia/workspace/lib/browser/workspace-variable-contribution';
13
- import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
14
- import { PreferenceConfigurations, PreferenceService } from '@theia/core';
15
- import { DebugCompound } from '../common/debug-compound';
16
- export interface WillProvideDebugConfiguration extends WaitUntilEvent {
17
- }
18
- export declare class DebugConfigurationManager {
19
- protected readonly workspaceService: WorkspaceService;
20
- protected readonly editorManager: EditorManager;
21
- protected readonly debug: DebugService;
22
- protected readonly quickPickService: QuickPickService;
23
- protected readonly contextKeyService: ContextKeyService;
24
- protected readonly labelProvider: LabelProvider;
25
- protected readonly textModelService: MonacoTextModelService;
26
- protected readonly preferences: PreferenceService;
27
- protected readonly preferenceConfigurations: PreferenceConfigurations;
28
- protected readonly workspaceVariables: WorkspaceVariableContribution;
29
- protected readonly onDidChangeEmitter: Emitter<void>;
30
- readonly onDidChange: Event<void>;
31
- protected readonly onWillProvideDebugConfigurationEmitter: Emitter<WillProvideDebugConfiguration>;
32
- readonly onWillProvideDebugConfiguration: Event<WillProvideDebugConfiguration>;
33
- protected readonly onWillProvideDynamicDebugConfigurationEmitter: Emitter<WillProvideDebugConfiguration>;
34
- get onWillProvideDynamicDebugConfiguration(): Event<WillProvideDebugConfiguration>;
35
- get onDidChangeConfigurationProviders(): Event<void>;
36
- protected debugConfigurationTypeKey: ContextKey<string>;
37
- protected initialized: Promise<void>;
38
- protected recentDynamicOptionsTracker: DynamicDebugConfigurationSessionOptions[];
39
- protected init(): void;
40
- protected doInit(): Promise<void>;
41
- protected readonly models: Map<string, DebugConfigurationModel>;
42
- protected updateModels: () => Promise<void>;
43
- /**
44
- * All _non-dynamic_ debug configurations.
45
- */
46
- get all(): IterableIterator<DebugSessionOptions>;
47
- protected getAll(): IterableIterator<DebugSessionOptions>;
48
- get supported(): Promise<IterableIterator<DebugSessionOptions>>;
49
- protected getSupported(): Promise<IterableIterator<DebugSessionOptions>>;
50
- protected doGetSupported(debugTypes: Set<string>): IterableIterator<DebugSessionOptions>;
51
- protected _currentOptions: DebugSessionOptions | undefined;
52
- get current(): DebugSessionOptions | undefined;
53
- getSelectedConfiguration(): Promise<DebugSessionOptions | undefined>;
54
- set current(option: DebugSessionOptions | undefined);
55
- protected updateRecentlyUsedDynamicConfigurationOptions(option: DebugSessionOptions | undefined): void;
56
- protected dynamicOptionsMatch(one: DynamicDebugConfigurationSessionOptions, other: DynamicDebugConfigurationSessionOptions): boolean;
57
- get recentDynamicOptions(): readonly DynamicDebugConfigurationSessionOptions[];
58
- protected updateCurrent(options?: DebugSessionOptions | undefined): void;
59
- /**
60
- * @deprecated since v1.27.0
61
- */
62
- find(name: string, workspaceFolderUri: string): DebugSessionOptions | undefined;
63
- /**
64
- * Find / Resolve DebugSessionOptions from a given target debug configuration
65
- */
66
- find(compound: DebugCompound, workspaceFolderUri?: string): DebugSessionOptions | undefined;
67
- find(configuration: DebugConfiguration, workspaceFolderUri?: string, providerType?: string): DebugSessionOptions | undefined;
68
- find(name: string, workspaceFolderUri?: string, providerType?: string): DebugSessionOptions | undefined;
69
- findConfigurations(name: string, workspaceFolderUri?: string): DebugConfiguration[];
70
- findConfiguration(name: string, workspaceFolderUri?: string): DebugConfiguration | undefined;
71
- findCompound(name: string, workspaceFolderUri?: string): DebugCompound | undefined;
72
- openConfiguration(): Promise<void>;
73
- protected configurationToOptions(configuration: DebugConfiguration, workspaceFolderUri?: string, providerType?: string): DebugSessionOptions;
74
- protected compoundToOptions(compound: DebugCompound, workspaceFolderUri?: string): DebugSessionOptions;
75
- addConfiguration(): Promise<void>;
76
- protected selectRootUri(): Promise<URI | undefined>;
77
- protected getModel(uri?: URI): DebugConfigurationModel | undefined;
78
- protected doOpen(model: DebugConfigurationModel): Promise<EditorWidget>;
79
- protected doCreate(model: DebugConfigurationModel): Promise<URI>;
80
- /**
81
- * Checks whether a `launch.json` file contains the minimum necessary content.
82
- * If content not found, provides content and populates the file using Monaco.
83
- */
84
- protected ensureContent(uri: URI, model: DebugConfigurationModel): Promise<void>;
85
- protected provideDebugConfigurations(debugType: string, workspaceFolderUri: string | undefined): Promise<DebugConfiguration[]>;
86
- protected fireWillProvideDebugConfiguration(): Promise<void>;
87
- provideDynamicDebugConfigurations(): Promise<Record<string, DynamicDebugConfigurationSessionOptions[]>>;
88
- fetchDynamicDebugConfiguration(name: string, type: string, folder?: string): Promise<DebugConfiguration | undefined>;
89
- protected fireWillProvideDynamicDebugConfiguration(): Promise<void>;
90
- protected getInitialConfigurationContent(initialConfigurations: DebugConfiguration[]): string;
91
- protected selectDebugType(): Promise<string | undefined>;
92
- protected readonly storage: StorageService;
93
- load(): Promise<void>;
94
- protected resolveRecentDynamicOptionsFromData(options?: DynamicDebugConfigurationSessionOptions[]): void;
95
- save(): void;
96
- }
97
- export declare namespace DebugConfigurationManager {
98
- interface Data {
99
- current?: DebugSessionOptions;
100
- recentDynamicOptions?: DynamicDebugConfigurationSessionOptions[];
101
- }
102
- }
103
- //# sourceMappingURL=debug-configuration-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug-configuration-manager.d.ts","sourceRoot":"","sources":["../../src/browser/debug-configuration-manager.ts"],"names":[],"mappings":"AAwBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,aAAa,EAAkB,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,uCAAuC,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;IAaxG,IAAI,IAAI,IAAI;CAef;AAED,yBAAiB,yBAAyB,CAAC;IACvC,UAAiB,IAAI;QACjB,OAAO,CAAC,EAAE,mBAAmB,CAAC;QAC9B,oBAAoB,CAAC,EAAE,uCAAuC,EAAE,CAAA;KACnE;CACJ"}
@@ -1,545 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2018 Red Hat, Inc. 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.DebugConfigurationManager = void 0;
19
- const tslib_1 = require("tslib");
20
- /*---------------------------------------------------------------------------------------------
21
- * Copyright (c) Microsoft Corporation. All rights reserved.
22
- * Licensed under the MIT License. See License.txt in the project root for license information.
23
- *--------------------------------------------------------------------------------------------*/
24
- const debounce = require("p-debounce");
25
- const jsonc_parser_1 = require("jsonc-parser");
26
- const inversify_1 = require("@theia/core/shared/inversify");
27
- const uri_1 = require("@theia/core/lib/common/uri");
28
- const event_1 = require("@theia/core/lib/common/event");
29
- const browser_1 = require("@theia/editor/lib/browser");
30
- const monaco_editor_1 = require("@theia/monaco/lib/browser/monaco-editor");
31
- const browser_2 = require("@theia/core/lib/browser");
32
- const quick_pick_service_1 = require("@theia/core/lib/common/quick-pick-service");
33
- const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
34
- const debug_configuration_model_1 = require("./debug-configuration-model");
35
- const debug_session_options_1 = require("./debug-session-options");
36
- const debug_service_1 = require("../common/debug-service");
37
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
38
- const debug_common_1 = require("../common/debug-common");
39
- const workspace_variable_contribution_1 = require("@theia/workspace/lib/browser/workspace-variable-contribution");
40
- const monaco_text_model_service_1 = require("@theia/monaco/lib/browser/monaco-text-model-service");
41
- const commands_1 = require("@theia/monaco-editor-core/esm/vs/platform/commands/common/commands");
42
- const standaloneServices_1 = require("@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices");
43
- const core_1 = require("@theia/core");
44
- let DebugConfigurationManager = class DebugConfigurationManager {
45
- constructor() {
46
- this.onDidChangeEmitter = new event_1.Emitter();
47
- this.onDidChange = this.onDidChangeEmitter.event;
48
- this.onWillProvideDebugConfigurationEmitter = new event_1.Emitter();
49
- this.onWillProvideDebugConfiguration = this.onWillProvideDebugConfigurationEmitter.event;
50
- this.onWillProvideDynamicDebugConfigurationEmitter = new event_1.Emitter();
51
- this.recentDynamicOptionsTracker = [];
52
- this.models = new Map();
53
- this.updateModels = debounce(async () => {
54
- const roots = await this.workspaceService.roots;
55
- const toDelete = new Set(this.models.keys());
56
- for (const rootStat of roots) {
57
- const key = rootStat.resource.toString();
58
- toDelete.delete(key);
59
- if (!this.models.has(key)) {
60
- const model = new debug_configuration_model_1.DebugConfigurationModel(key, this.preferences);
61
- model.onDidChange(() => this.updateCurrent());
62
- model.onDispose(() => this.models.delete(key));
63
- this.models.set(key, model);
64
- }
65
- }
66
- for (const uri of toDelete) {
67
- const model = this.models.get(uri);
68
- if (model) {
69
- model.dispose();
70
- }
71
- }
72
- this.updateCurrent();
73
- }, 500);
74
- }
75
- get onWillProvideDynamicDebugConfiguration() {
76
- return this.onWillProvideDynamicDebugConfigurationEmitter.event;
77
- }
78
- get onDidChangeConfigurationProviders() {
79
- return this.debug.onDidChangeDebugConfigurationProviders;
80
- }
81
- init() {
82
- this.doInit();
83
- }
84
- async doInit() {
85
- this.debugConfigurationTypeKey = this.contextKeyService.createKey('debugConfigurationType', undefined);
86
- this.initialized = this.preferences.ready.then(() => {
87
- this.workspaceService.onWorkspaceChanged(this.updateModels);
88
- this.preferences.onPreferenceChanged(e => {
89
- if (e.preferenceName === 'launch') {
90
- this.updateModels();
91
- }
92
- });
93
- return this.updateModels();
94
- });
95
- }
96
- /**
97
- * All _non-dynamic_ debug configurations.
98
- */
99
- get all() {
100
- return this.getAll();
101
- }
102
- *getAll() {
103
- for (const model of this.models.values()) {
104
- for (const configuration of model.configurations) {
105
- yield this.configurationToOptions(configuration, model.workspaceFolderUri);
106
- }
107
- for (const compound of model.compounds) {
108
- yield this.compoundToOptions(compound, model.workspaceFolderUri);
109
- }
110
- }
111
- }
112
- get supported() {
113
- return this.getSupported();
114
- }
115
- async getSupported() {
116
- await this.initialized;
117
- const debugTypes = await this.debug.debugTypes();
118
- return this.doGetSupported(new Set(debugTypes));
119
- }
120
- *doGetSupported(debugTypes) {
121
- for (const options of this.getAll()) {
122
- if (options.configuration && debugTypes.has(options.configuration.type)) {
123
- yield options;
124
- }
125
- }
126
- }
127
- get current() {
128
- return this._currentOptions;
129
- }
130
- async getSelectedConfiguration() {
131
- if (!debug_session_options_1.DebugSessionOptions.isDynamic(this._currentOptions)) {
132
- return this._currentOptions;
133
- }
134
- // Refresh a dynamic configuration from the provider.
135
- // This allow providers to update properties before the execution e.g. program
136
- const { providerType, workspaceFolderUri, configuration: { name } } = this._currentOptions;
137
- const configuration = await this.fetchDynamicDebugConfiguration(name, providerType, workspaceFolderUri);
138
- if (!configuration) {
139
- const message = core_1.nls.localize('theia/debug/missingConfiguration', "Dynamic configuration '{0}:{1}' is missing or not applicable", providerType, name);
140
- throw new Error(message);
141
- }
142
- return { name, configuration, providerType, workspaceFolderUri };
143
- }
144
- set current(option) {
145
- this.updateCurrent(option);
146
- this.updateRecentlyUsedDynamicConfigurationOptions(option);
147
- }
148
- updateRecentlyUsedDynamicConfigurationOptions(option) {
149
- if (debug_session_options_1.DebugSessionOptions.isDynamic(option)) {
150
- // Removing an item already present in the list
151
- const index = this.recentDynamicOptionsTracker.findIndex(item => this.dynamicOptionsMatch(item, option));
152
- if (index > -1) {
153
- this.recentDynamicOptionsTracker.splice(index, 1);
154
- }
155
- // Adding new item, most recent at the top of the list
156
- const recentMax = 3;
157
- if (this.recentDynamicOptionsTracker.unshift(option) > recentMax) {
158
- // Keep the latest 3 dynamic configuration options to not clutter the dropdown.
159
- this.recentDynamicOptionsTracker.splice(recentMax);
160
- }
161
- }
162
- }
163
- dynamicOptionsMatch(one, other) {
164
- return one.providerType !== undefined
165
- && one.configuration.name === other.configuration.name
166
- && one.providerType === other.providerType
167
- && one.workspaceFolderUri === other.workspaceFolderUri;
168
- }
169
- get recentDynamicOptions() {
170
- return this.recentDynamicOptionsTracker;
171
- }
172
- updateCurrent(options = this._currentOptions) {
173
- var _a;
174
- if (debug_session_options_1.DebugSessionOptions.isCompound(options)) {
175
- this._currentOptions = options && this.find(options.compound, options.workspaceFolderUri);
176
- }
177
- else {
178
- this._currentOptions = options && this.find(options.configuration, options.workspaceFolderUri, options.providerType);
179
- }
180
- if (!this._currentOptions) {
181
- const model = this.getModel();
182
- if (model) {
183
- const configuration = model.configurations[0];
184
- if (configuration) {
185
- this._currentOptions = this.configurationToOptions(configuration, model.workspaceFolderUri);
186
- }
187
- }
188
- }
189
- this.debugConfigurationTypeKey.set(this.current && ((_a = this.current.configuration) === null || _a === void 0 ? void 0 : _a.type));
190
- this.onDidChangeEmitter.fire(undefined);
191
- }
192
- find(nameOrConfigurationOrCompound, workspaceFolderUri, providerType) {
193
- if (debug_common_1.DebugConfiguration.is(nameOrConfigurationOrCompound) && providerType) {
194
- // providerType is only applicable to dynamic debug configurations and may only be created if we have a configuration given
195
- return this.configurationToOptions(nameOrConfigurationOrCompound, workspaceFolderUri, providerType);
196
- }
197
- const name = typeof nameOrConfigurationOrCompound === 'string' ? nameOrConfigurationOrCompound : nameOrConfigurationOrCompound.name;
198
- const configuration = this.findConfiguration(name, workspaceFolderUri);
199
- if (configuration) {
200
- return this.configurationToOptions(configuration, workspaceFolderUri);
201
- }
202
- const compound = this.findCompound(name, workspaceFolderUri);
203
- if (compound) {
204
- return this.compoundToOptions(compound, workspaceFolderUri);
205
- }
206
- }
207
- findConfigurations(name, workspaceFolderUri) {
208
- const matches = [];
209
- for (const model of this.models.values()) {
210
- if (model.workspaceFolderUri === workspaceFolderUri) {
211
- for (const configuration of model.configurations) {
212
- if (configuration.name === name) {
213
- matches.push(configuration);
214
- }
215
- }
216
- }
217
- }
218
- return matches;
219
- }
220
- findConfiguration(name, workspaceFolderUri) {
221
- for (const model of this.models.values()) {
222
- if (model.workspaceFolderUri === workspaceFolderUri) {
223
- for (const configuration of model.configurations) {
224
- if (configuration.name === name) {
225
- return configuration;
226
- }
227
- }
228
- }
229
- }
230
- }
231
- findCompound(name, workspaceFolderUri) {
232
- for (const model of this.models.values()) {
233
- if (model.workspaceFolderUri === workspaceFolderUri) {
234
- for (const compound of model.compounds) {
235
- if (compound.name === name) {
236
- return compound;
237
- }
238
- }
239
- }
240
- }
241
- }
242
- async openConfiguration() {
243
- var _a;
244
- const currentUri = new uri_1.default((_a = this.current) === null || _a === void 0 ? void 0 : _a.workspaceFolderUri);
245
- const model = this.getModel(currentUri);
246
- if (model) {
247
- await this.doOpen(model);
248
- }
249
- }
250
- configurationToOptions(configuration, workspaceFolderUri, providerType) {
251
- return { name: configuration.name, configuration, providerType, workspaceFolderUri };
252
- }
253
- compoundToOptions(compound, workspaceFolderUri) {
254
- return { name: compound.name, compound, workspaceFolderUri };
255
- }
256
- async addConfiguration() {
257
- var _a;
258
- let rootUri = undefined;
259
- if (this.workspaceService.saved && this.workspaceService.tryGetRoots().length > 1) {
260
- rootUri = await this.selectRootUri();
261
- // Do not continue if the user explicitly does not choose a location.
262
- if (!rootUri) {
263
- return;
264
- }
265
- }
266
- const model = this.getModel(rootUri);
267
- if (!model) {
268
- return;
269
- }
270
- const editor = (_a = monaco_editor_1.MonacoEditor.get(await this.doOpen(model))) === null || _a === void 0 ? void 0 : _a.getControl();
271
- const editorModel = editor && editor.getModel();
272
- if (!editorModel) {
273
- return;
274
- }
275
- const commandService = standaloneServices_1.StandaloneServices.get(commands_1.ICommandService);
276
- let position;
277
- let depthInArray = 0;
278
- let lastProperty = '';
279
- (0, jsonc_parser_1.visit)(editor.getValue(), {
280
- onObjectProperty: property => {
281
- lastProperty = property;
282
- },
283
- onArrayBegin: offset => {
284
- if (lastProperty === 'configurations' && depthInArray === 0) {
285
- position = editorModel.getPositionAt(offset + 1);
286
- }
287
- depthInArray++;
288
- },
289
- onArrayEnd: () => {
290
- depthInArray--;
291
- }
292
- });
293
- if (!position) {
294
- return;
295
- }
296
- // Check if there are more characters on a line after a "configurations": [, if yes enter a newline
297
- if (editorModel.getLineLastNonWhitespaceColumn(position.lineNumber) > position.column) {
298
- editor.setPosition(position);
299
- editor.trigger('debug', 'lineBreakInsert', undefined);
300
- }
301
- // Check if there is already an empty line to insert suggest, if yes just place the cursor
302
- if (editorModel.getLineLastNonWhitespaceColumn(position.lineNumber + 1) === 0) {
303
- editor.setPosition({ lineNumber: position.lineNumber + 1, column: 1 << 30 });
304
- await commandService.executeCommand('editor.action.deleteLines');
305
- }
306
- editor.setPosition(position);
307
- await commandService.executeCommand('editor.action.insertLineAfter');
308
- await commandService.executeCommand('editor.action.triggerSuggest');
309
- }
310
- async selectRootUri() {
311
- const workspaceRoots = this.workspaceService.tryGetRoots();
312
- const items = [];
313
- for (const workspaceRoot of workspaceRoots) {
314
- items.push({
315
- label: this.labelProvider.getName(workspaceRoot.resource),
316
- description: this.labelProvider.getLongName(workspaceRoot.resource),
317
- value: workspaceRoot.resource
318
- });
319
- }
320
- const root = await this.quickPickService.show(items, {
321
- placeholder: core_1.nls.localize('theia/debug/addConfigurationPlaceholder', 'Select workspace root to add configuration to'),
322
- });
323
- return root === null || root === void 0 ? void 0 : root.value;
324
- }
325
- getModel(uri) {
326
- const workspaceFolderUri = this.workspaceVariables.getWorkspaceRootUri(uri);
327
- if (workspaceFolderUri) {
328
- const key = workspaceFolderUri.toString();
329
- for (const model of this.models.values()) {
330
- if (model.workspaceFolderUri === key) {
331
- return model;
332
- }
333
- }
334
- }
335
- for (const model of this.models.values()) {
336
- if (model.uri) {
337
- return model;
338
- }
339
- }
340
- return this.models.values().next().value;
341
- }
342
- async doOpen(model) {
343
- const uri = await this.doCreate(model);
344
- return this.editorManager.open(uri, {
345
- mode: 'activate'
346
- });
347
- }
348
- async doCreate(model) {
349
- var _a;
350
- const uri = (_a = model.uri) !== null && _a !== void 0 ? _a : this.preferences.getConfigUri(core_1.PreferenceScope.Folder, model.workspaceFolderUri, 'launch');
351
- if (!uri) { // Since we are requesting information about a known workspace folder, this should never happen.
352
- throw new Error('PreferenceService.getConfigUri has returned undefined when a URI was expected.');
353
- }
354
- const settingsUri = this.preferences.getConfigUri(core_1.PreferenceScope.Folder, model.workspaceFolderUri);
355
- // Users may have placed their debug configurations in a `settings.json`, in which case we shouldn't modify the file.
356
- if (settingsUri && !uri.isEqual(settingsUri)) {
357
- await this.ensureContent(uri, model);
358
- }
359
- return uri;
360
- }
361
- /**
362
- * Checks whether a `launch.json` file contains the minimum necessary content.
363
- * If content not found, provides content and populates the file using Monaco.
364
- */
365
- async ensureContent(uri, model) {
366
- const textModel = await this.textModelService.createModelReference(uri);
367
- const currentContent = textModel.object.valid ? textModel.object.getText() : '';
368
- try { // Look for the minimal well-formed launch.json content: {configurations: []}
369
- const parsedContent = (0, jsonc_parser_1.parse)(currentContent);
370
- if (Array.isArray(parsedContent.configurations)) {
371
- return;
372
- }
373
- }
374
- catch {
375
- // Just keep going
376
- }
377
- const debugType = await this.selectDebugType();
378
- const configurations = debugType ? await this.provideDebugConfigurations(debugType, model.workspaceFolderUri) : [];
379
- const content = this.getInitialConfigurationContent(configurations);
380
- textModel.object.textEditorModel.setValue(content); // Will clobber anything the user has entered!
381
- await textModel.object.save();
382
- }
383
- async provideDebugConfigurations(debugType, workspaceFolderUri) {
384
- await this.fireWillProvideDebugConfiguration();
385
- return this.debug.provideDebugConfigurations(debugType, workspaceFolderUri);
386
- }
387
- async fireWillProvideDebugConfiguration() {
388
- await event_1.WaitUntilEvent.fire(this.onWillProvideDebugConfigurationEmitter, {});
389
- }
390
- async provideDynamicDebugConfigurations() {
391
- await this.fireWillProvideDynamicDebugConfiguration();
392
- const roots = this.workspaceService.tryGetRoots();
393
- const promises = roots.map(async (root) => {
394
- const configsMap = await this.debug.provideDynamicDebugConfigurations(root.resource.toString());
395
- const optionsMap = Object.fromEntries(Object.entries(configsMap).map(([type, configs]) => {
396
- const options = configs.map(config => ({
397
- name: config.name,
398
- providerType: type,
399
- configuration: config,
400
- workspaceFolderUri: root.resource.toString()
401
- }));
402
- return [type, options];
403
- }));
404
- return optionsMap;
405
- });
406
- const typesToOptionsRecords = await Promise.all(promises);
407
- const consolidatedTypesToOptions = {};
408
- for (const typesToOptionsInstance of typesToOptionsRecords) {
409
- for (const [providerType, configurationsOptions] of Object.entries(typesToOptionsInstance)) {
410
- if (!consolidatedTypesToOptions[providerType]) {
411
- consolidatedTypesToOptions[providerType] = [];
412
- }
413
- consolidatedTypesToOptions[providerType].push(...configurationsOptions);
414
- }
415
- }
416
- return consolidatedTypesToOptions;
417
- }
418
- async fetchDynamicDebugConfiguration(name, type, folder) {
419
- await this.fireWillProvideDynamicDebugConfiguration();
420
- return this.debug.fetchDynamicDebugConfiguration(name, type, folder);
421
- }
422
- async fireWillProvideDynamicDebugConfiguration() {
423
- await this.initialized;
424
- await event_1.WaitUntilEvent.fire(this.onWillProvideDynamicDebugConfigurationEmitter, {});
425
- }
426
- getInitialConfigurationContent(initialConfigurations) {
427
- return `{
428
- // ${core_1.nls.localizeByDefault('Use IntelliSense to learn about possible attributes.')}
429
- // ${core_1.nls.localizeByDefault('Hover to view descriptions of existing attributes.')}
430
- "version": "0.2.0",
431
- "configurations": ${JSON.stringify(initialConfigurations, undefined, ' ').split('\n').map(line => ' ' + line).join('\n').trim()}
432
- }
433
- `;
434
- }
435
- async selectDebugType() {
436
- const widget = this.editorManager.currentEditor;
437
- if (!widget) {
438
- return undefined;
439
- }
440
- const { languageId } = widget.editor.document;
441
- const debuggers = await this.debug.getDebuggersForLanguage(languageId);
442
- if (debuggers.length === 0) {
443
- return undefined;
444
- }
445
- const items = debuggers.map(({ label, type }) => ({ label, value: type }));
446
- const selectedItem = await this.quickPickService.show(items, { placeholder: core_1.nls.localizeByDefault('Select debugger') });
447
- return selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value;
448
- }
449
- async load() {
450
- var _a, _b;
451
- await this.initialized;
452
- const data = await this.storage.getData('debug.configurations', {});
453
- this.resolveRecentDynamicOptionsFromData(data.recentDynamicOptions);
454
- // Between versions v1.26 and v1.27, the expected format of the data changed so that old stored data
455
- // may not contain the configuration key.
456
- if (debug_session_options_1.DebugSessionOptions.isConfiguration(data.current)) {
457
- // ensure options name is reflected from old configurations data
458
- data.current.name = (_a = data.current.name) !== null && _a !== void 0 ? _a : (_b = data.current.configuration) === null || _b === void 0 ? void 0 : _b.name;
459
- this.current = this.find(data.current.configuration, data.current.workspaceFolderUri, data.current.providerType);
460
- }
461
- else if (debug_session_options_1.DebugSessionOptions.isCompound(data.current)) {
462
- this.current = this.find(data.current.name, data.current.workspaceFolderUri);
463
- }
464
- }
465
- resolveRecentDynamicOptionsFromData(options) {
466
- if (!options || this.recentDynamicOptionsTracker.length !== 0) {
467
- return;
468
- }
469
- // ensure options name is reflected from old configurations data
470
- const dynamicOptions = options.map(option => {
471
- var _a;
472
- option.name = (_a = option.name) !== null && _a !== void 0 ? _a : option.configuration.name;
473
- return option;
474
- }).filter(debug_session_options_1.DebugSessionOptions.isDynamic);
475
- this.recentDynamicOptionsTracker = dynamicOptions;
476
- }
477
- save() {
478
- const data = {};
479
- const { current, recentDynamicOptionsTracker } = this;
480
- if (current) {
481
- data.current = current;
482
- }
483
- if (this.recentDynamicOptionsTracker.length > 0) {
484
- data.recentDynamicOptions = recentDynamicOptionsTracker;
485
- }
486
- if (Object.keys(data).length > 0) {
487
- this.storage.setData('debug.configurations', data);
488
- }
489
- }
490
- };
491
- exports.DebugConfigurationManager = DebugConfigurationManager;
492
- tslib_1.__decorate([
493
- (0, inversify_1.inject)(workspace_service_1.WorkspaceService),
494
- tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
495
- ], DebugConfigurationManager.prototype, "workspaceService", void 0);
496
- tslib_1.__decorate([
497
- (0, inversify_1.inject)(browser_1.EditorManager),
498
- tslib_1.__metadata("design:type", browser_1.EditorManager)
499
- ], DebugConfigurationManager.prototype, "editorManager", void 0);
500
- tslib_1.__decorate([
501
- (0, inversify_1.inject)(debug_service_1.DebugService),
502
- tslib_1.__metadata("design:type", Object)
503
- ], DebugConfigurationManager.prototype, "debug", void 0);
504
- tslib_1.__decorate([
505
- (0, inversify_1.inject)(quick_pick_service_1.QuickPickService),
506
- tslib_1.__metadata("design:type", Object)
507
- ], DebugConfigurationManager.prototype, "quickPickService", void 0);
508
- tslib_1.__decorate([
509
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
510
- tslib_1.__metadata("design:type", Object)
511
- ], DebugConfigurationManager.prototype, "contextKeyService", void 0);
512
- tslib_1.__decorate([
513
- (0, inversify_1.inject)(browser_2.LabelProvider),
514
- tslib_1.__metadata("design:type", browser_2.LabelProvider)
515
- ], DebugConfigurationManager.prototype, "labelProvider", void 0);
516
- tslib_1.__decorate([
517
- (0, inversify_1.inject)(monaco_text_model_service_1.MonacoTextModelService),
518
- tslib_1.__metadata("design:type", monaco_text_model_service_1.MonacoTextModelService)
519
- ], DebugConfigurationManager.prototype, "textModelService", void 0);
520
- tslib_1.__decorate([
521
- (0, inversify_1.inject)(core_1.PreferenceService),
522
- tslib_1.__metadata("design:type", Object)
523
- ], DebugConfigurationManager.prototype, "preferences", void 0);
524
- tslib_1.__decorate([
525
- (0, inversify_1.inject)(core_1.PreferenceConfigurations),
526
- tslib_1.__metadata("design:type", core_1.PreferenceConfigurations)
527
- ], DebugConfigurationManager.prototype, "preferenceConfigurations", void 0);
528
- tslib_1.__decorate([
529
- (0, inversify_1.inject)(workspace_variable_contribution_1.WorkspaceVariableContribution),
530
- tslib_1.__metadata("design:type", workspace_variable_contribution_1.WorkspaceVariableContribution)
531
- ], DebugConfigurationManager.prototype, "workspaceVariables", void 0);
532
- tslib_1.__decorate([
533
- (0, inversify_1.postConstruct)(),
534
- tslib_1.__metadata("design:type", Function),
535
- tslib_1.__metadata("design:paramtypes", []),
536
- tslib_1.__metadata("design:returntype", void 0)
537
- ], DebugConfigurationManager.prototype, "init", null);
538
- tslib_1.__decorate([
539
- (0, inversify_1.inject)(browser_2.StorageService),
540
- tslib_1.__metadata("design:type", Object)
541
- ], DebugConfigurationManager.prototype, "storage", void 0);
542
- exports.DebugConfigurationManager = DebugConfigurationManager = tslib_1.__decorate([
543
- (0, inversify_1.injectable)()
544
- ], DebugConfigurationManager);
545
- //# sourceMappingURL=debug-configuration-manager.js.map