-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
Debug extension priority #184883
Comments
This is a problem that shows up in a lot of extension API, the result is sometimes basically undefined behavior, because we don't really want this situation to happen and hope that extensions will try to pick a unique ID. How long have these two extensions had this conflict? Can users just disable the one they are not using? |
Hi Rob!
Ideally each function would be packed into a small extension (allowing the user to pick between different providers) but at the end this is the authors choice. And not an unusual one, as can be seen with other commercial or big-company backed extensions (like Dart/Flutter, JS, TS...). A solution I can imagine for this is that the user can set a setting where they define what extension ID is used for a certain debug type. I think that if extensions have other conflicts - like define settings with same names - the user gets an error while extension loading. I don't know if there were any other cases like this before, but ultimately it should be the users word at the end. |
I definitely agree
alas, you're right
js-debug is a clean single-purpose extension, language features and other tools come in other extensions, fwiw Do you think that we could bring this up with the devsense maintainers to have them consider forking the debug feature into a separate extension? They can bring it along with their PHP extension using an extensionPack so users won't miss anything, but would be able to separately disable that debug extension. I would strongly prefer this to coming up with a setting for this scenario. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Sorry, could not get to this before. I will try to reach out. |
Hi @roblourens ! Hopefully I can recycle this issue if not, I'll open a new one. I exchanged some ideas with the Devsense maintainers DEVSENSE/phptools-docs#355 and there were some ideas I'd love to get your input on. One was to use a The other is if the authors decide to split the extension up. Could they add a Also what would be the best way for those two extension to communicate. I listed some ideas in the linked issue. If you have any extra input here. Last and most ideal for us would be if VS Code could handle this the same way that it handles code formatters. If there are multiple, the user gets a dialog. I'm guessing picking one of the DAPs for the specified debugger type wouldn't be such a big deal, but I can't imagine what to do with all the other debugger related VS Code APIs inside those extensions then. And the host of things that come with a typical DAP package.json manifest... I understand this is probably a first and also very uncommon situation we are discussing here so I don't expect much effort to go into this. Maybe a small step could be to show a notification to the user on startup that there are two conflicting extension registering for a certain debugger type. I can offer to look into implementing this as a POC and see where and if we go from there. |
Yes, this is supported and would totally be possible
That is another valid option. The Python extension is actually in the process of doing this. They have different motivations but it's the same idea, the debugger will have its own extension. You might take some inspiration from them https://github.com/microsoft/vscode-python-debugger
I don't see it as the same situation. Having multiple code formatters for a language is normal and expected but overloading debug IDs shouldn't happen regularly.
I don't know what the user would be expected to do about this. I'd prefer that we just address this case. If UX is needed to guide the user maybe it should come from one of the extensions. |
Great, will let the devsense authors know this could be the way.
Also great, will try to look at that and point out how they are doing it.
Valid point.
Follow up question. How can an extension know there is a "competing" extension for the same debug type? I can't seem to find a suitable VS Code API. Thanks! |
I don't think there's really any way to know for sure. |
I am experiencing a similar issue where "devsense.com" in the VSCode extensions is consuming up to 5GB of memory on my M1 Mac and causing faster battery drain than usual. The process name in Activity Monitor is "devsense.php.ls". Please review the memory usage of this extension and consider optimizing it. |
You can file an issue on the devsense extension for that. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
When creating a
launch.json
to debug a program, thetype
field lets the user tell what "language" they are debugging.Debugging extensions register this via
debuggers.type
contribution point.If there are there are multiple extension that register the same debugger type, the first will (probably) be selected in alphabetical order.
Is there a way for the user to explicitly tell what extension to use for a conflicting debugger type? Maybe a setting could be used to override this?
Ref: xdebug/vscode-php-debug#905
The text was updated successfully, but these errors were encountered: