Commit 11892ff
committed
fix: store original handle of debug adapter config
When frontend and main VS Code extensions load together, Theia creates
two extension host instances to manage different kinds of extensions.
Each will register the extensions' contributed debug adapter
configuration providers with incremented handles.
In cases of handle collisions during the registration of debug
configurations, Theia adjusts the handle of incoming providers.
However, this adjustment causes issues as the extension host no longer
associates the new handle with the original ID.
For instance, if the main VSIX contributes two debuggers assigned
handles `0` and `1`, and the web VSIX contributes a debugger with a
colliding handle `0`, Theia changes the web provider's handle to `2`.
Subsequently, when starting a debug session, the main extension
attempts to resolve handle `2`, but the frontend extension host only
recognizes the initial configuration.
This commit addresses the issue by storing the original handle of the
debug adapter configuration. During handle ID lookups, it will
reference the originally assigned handle instead of the adjusted one,
ensuring proper resolution and functionality across both extension host
instances.
Ref: eclipse-theia#131961 parent afde78f commit 11892ff
File tree
1 file changed
+9
-3
lines changed- packages/plugin-ext/src/main/browser/debug
1 file changed
+9
-3
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
48 | | - | |
| 54 | + | |
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | | - | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
60 | | - | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
0 commit comments