-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple calls to the same extension (DebugConfigurationProvider#resolveDebugConfiguration) #9978
Comments
The loop for |
@tsmaeder, it sounds like what we should be doing here is ensuring activation of any plugin that activates on |
Looking at the code it seems that we are due for a refactoring on this area, I think the Configuration providers should be available to the The code base would not work properly as there may be plugins registering debugger contributors but not registering configuration providers as well as plugins registering configuration providers and not register debugger contributions. We could hack a solution where we call any register contributor to resolve a configuration, but even that does not work for all cases (i.e. No debugger contributions registered and Configuration providers registered). @tsmaeder, @colin-grant-work, Please let me know what you guys think!! |
I was doing some checking in this area related to this issue and this PR, and I found a couple of new issues, as well. I think I've overstated the double registration issue: one is at read time when the manifest is processed and one is at activation time, but we're still ending up with redundancy. It definitely seems that some refactoring is due, and it sounds like you have a reasonable idea of where to begin, @alvsan09. |
The implementation of the vscode API for the resolution of initial debug configurations as well as the resolution of specific configurations was relying on the registered debug adapter contributors rather than debug configuration providers, this is causing issues e.g. #9978. This implementation brings access to the debug configuration providers all the way to the browser debug/plugin-debug-service, where the providers can be filtered and then call its corresponding API indirectly. The former API is kept as deprecated. breaking changes WIP
The implementation of the vscode API for the resolution of initial debug configurations as well as the resolution of specific configurations was relying on the registered debug adapter contributors rather than debug configuration providers, this is causing issues e.g. #9978. This implementation brings access to the debug configuration providers all the way to the browser debug/plugin-debug-service, where the providers can be filtered and then call its corresponding API indirectly. The former API is kept as deprecated. Signed-off-by: Alvaro Sanchez-Leon <[email protected]>
The implementation of the vscode API for the resolution of initial debug configurations as well as the resolution of specific configurations was relying on the registered debug adapter contributors rather than debug configuration providers, this is causing issues e.g. #9978. This implementation brings access to the debug configuration providers all the way to the browser debug/plugin-debug-service, where the providers can be filtered and then call its corresponding API indirectly. The former API is kept as deprecated. Signed-off-by: Alvaro Sanchez-Leon <[email protected]>
The implementation of the vscode API for the resolution of initial debug configurations as well as the resolution of specific configurations was relying on the registered debug adapter contributors rather than debug configuration providers, this is causing issues e.g. #9978. This implementation brings access to the debug configuration providers all the way to the browser debug/plugin-debug-service, where the providers can be filtered and then call its corresponding API indirectly. The former API is kept as deprecated. Signed-off-by: Alvaro Sanchez-Leon <[email protected]>
The implementation of the vscode API for the resolution of initial debug configurations as well as the resolution of specific configurations was relying on the registered debug adapter contributors rather than debug configuration providers, this is causing issues e.g. #9978. This implementation brings access to the debug configuration providers all the way to the browser debug/plugin-debug-service, where the providers can be filtered and then call its corresponding API indirectly. The former API is kept as deprecated. Signed-off-by: Alvaro Sanchez-Leon <[email protected]>
Bug Description:
While prototyping a solution for the support of dynamic debug configurations, it was observed that some extensions (e.g.
ms-vscode.js-debug
) may have implemented side effects of configuration providers i.e. instantiating a terminal when callingresolveDebugConfiguration
.During testing of the above we can see that using this extension with
theia
would trigger the creation of multiple terminals instead of one.Troubleshooting has shown that
theia
is calling this function multiple times to the same configuration provider and for the same configuration.Steps to Reproduce: (v1.17.0)
The issue can be reproduced outside the prototype mentioned above with the help of a test fork of
the 'vscode-mock-debug` extension as described below.
vscode-mock-debug
extension to your development environment e.g.checkout this specific branch:
mock-extension
theia
application e.g.in chrome navigate to the
mock
sample workspaceexample: (replace with actual path to yours)
http://localhost:3000/#/home/${USER}/git/theia/plugins/vscode-mock-debug/sampleWorkspace
Open the
readme.md
fileSwitch to the
Debug
view and on the drop down menu select the optionAdd configuration...
and select:From the drop down menu select the new configuration above and press
Start Debugging
Go back to your terminal (where you started
theia
) and see the multiple request arriving for the same configuration.Additional Information
The location of the actual loop triggering the multiple calls is at the front end at:
the picture shows the content of
this.contributors
.https://github.com/eclipse-theia/theia/blob/master/packages/plugin-ext/src/main/browser/debug/plugin-debug-service.ts#L114
Then a second loop is in place in the plugin host, this loop does not cause multiple calls as it filters the providers to be called as per the received debug type.
the picture shows the content of
this.configurationProviders
.https://github.com/eclipse-theia/theia/blob/master/packages/plugin-ext/src/plugin/node/debug/debug.ts#L337
The purpose of the loop in the first link above is unclear and even the one in the second loop seems to provide a preference to a debug type of '*'. which is not clear either.
Some input on the history of this implementation would be very helpful !
The text was updated successfully, but these errors were encountered: