-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
support mime-type when showing source from non-files in editor #8182
Comments
This should be possible -> will investigate in debt week thus assigning to July |
I have looked into this and it is possible to support this. Assigning to @weinand to add |
@isidorn I've added an |
@felixfbecker you might interested in this. |
Wouldn't it be easier to use the VS Code language ID? <?php
throw new Exception(); to the source to get syntax highlighting. That of course means I have to add an offset of 1 to every break and subtract 1 from every breakpoint, but only for source requests. Do you have a better solution for this? |
@felixfbecker I've CCed you because I saw your code that adds the response.body = { content: source, mimeType: 'application/x-php' }; We are not using the language ID because that is a VS Code concept. A mime type is universal. If a debug adapter is run in a different context, it is easier to return a mime type than to return the correct language id. |
@weinand Sure I could return the mime type instead of returning |
@felixfbecker I see. |
If a debug adapter returns source from the sourceRequest, the debug UI only recognises the correct (language) type if the name attribute of the source has a proper file extension.
For this reason some debug adapters have to add an extension to the name artificially.
This feature request asks for a more direct mechanism based on a new 'mimeType' attribute on the SourceRequest response. If available the debug UI should configure the editor for this mime-type.
The text was updated successfully, but these errors were encountered: