Skip to content
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

No syntax highlighting for dynamic .ts docs from debugger #34987

Closed
roblourens opened this issue Sep 25, 2017 · 6 comments
Closed

No syntax highlighting for dynamic .ts docs from debugger #34987

roblourens opened this issue Sep 25, 2017 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded

Comments

@roblourens
Copy link
Member

roblourens commented Sep 25, 2017

When I get a .ts document from the debugger, it is no longer highlighted. Shouldn't this be done from the file extension? I think this worked before.

image

@isidorn
Copy link
Contributor

isidorn commented Sep 26, 2017

Nothing changed on the debug side.
Though we have done quite some refactorings with the uri.
@mjbvz on what documents do you do .ts syntax highlighting? Do you look at the file extension or?
@roblourens repro steps would be great. Can you debug and check what is the exect uri of that document, you could place some breakpoints in DebugSource to check how this document gets created and then check back with @mjbvz if that uri should be handled by him

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues info-needed Issue requires more information from poster typescript Typescript support issues labels Sep 26, 2017
@mjbvz
Copy link
Contributor

mjbvz commented Sep 26, 2017

@isidorn We register the ts grammar based on language:

    "grammars": [
      {
        "language": "typescript",
        "scopeName": "source.ts",
        "path": "./syntaxes/TypeScript.tmLanguage.json"
      }
],
    "languages": [
      {
        "id": "typescript",
        "aliases": [
          "TypeScript",
          "ts",
          "typescript"
        ],
        "extensions": [
          ".ts"
        ],
        "configuration": "./language-configuration.json"
      }

@roblourens What is the language mode of the document in this case?

@roblourens
Copy link
Member Author

It is plain text but I thought TS should be picked up based on the extension. The full path is correct. I'll debug in DebugSource

@roblourens
Copy link
Member Author

The uri is "debug:/Users/roblou/code/vscode-chrome-debug-core/node_modules/vscode-debugadapter/src/logger.ts?session%3Ddc36384e-3877-4b86-8634-86108c214336%26ref%3D1144", I guess the special debug uri is interfering with extension checking for the language mode?

@roblourens roblourens added this to the September 2017 milestone Sep 26, 2017
@isidorn
Copy link
Contributor

isidorn commented Sep 27, 2017

I have pushed a potential fix to only use the path for mimeTypeGuessing, not the full query of the uri.
If the fix does not work then:

  • how is the file detected in the status bar as the language?
  • You can put a breakpoint here and check what mode that file is set to.
    Do you get colorization if you manualy set the language to typescript for that file?

@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster typescript Typescript support issues labels Sep 27, 2017
@roblourens
Copy link
Member Author

Looks good now!

@roblourens roblourens added the verified Verification succeeded label Sep 28, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants