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

Developer: Inspect Tokens menu won't load #5

Open
shshaw opened this issue Oct 30, 2020 · 6 comments
Open

Developer: Inspect Tokens menu won't load #5

shshaw opened this issue Oct 30, 2020 · 6 comments

Comments

@shshaw
Copy link

shshaw commented Oct 30, 2020

When using this approach, the command for Developer: Inspect Tokens turns up this error.

errors.js:22 Uncaught Error: Not supported!

Error: Not supported!
    at EncodedTokenizationSupport2Adapter.tokenize (standaloneLanguages.js:110)
    at InspectTokensWidget._getStateBeforeLine (inspectTokens.js:269)
    at InspectTokensWidget._getTokensAtLine (inspectTokens.js:256)
    at InspectTokensWidget._compute (inspectTokens.js:174)
    at new InspectTokensWidget (inspectTokens.js:161)
    at InspectTokensController.launch (inspectTokens.js:79)
    at InspectTokens.run (inspectTokens.js:107)
    at InspectTokens.EditorAction.runEditorCommand (editorExtensions.js:204)
    at eval (codeEditorWidget.js:247)
    at InstantiationService.invokeFunction (instantiationService.js:84)
    at eval (errors.js:22)
eval @ errors.js:22
setTimeout (async)
ErrorHandler.unexpectedErrorHandler @ errors.js:20
ErrorHandler.onUnexpectedError @ errors.js:34
onUnexpectedError @ errors.js:48
eval @ quickCommand.js:76
setTimeout (async)
EditorActionCommandEntry.run @ quickCommand.js:68
QuickOpenModel.run @ quickOpenModel.js:423
QuickOpenWidget.elementSelected @ quickOpenWidget.js:431
eval @ quickOpenWidget.js:168

Do you know how to get around this?

@shshaw
Copy link
Author

shshaw commented Oct 30, 2020

I should note I'm mainly trying to debug themes and figure out how to best port a VS Code theme over to Monaco; let me know if you have any resources on that.

@bolinfest
Copy link
Owner

Yeah, I've hit this as well :( @alexdima any chance you could point me at a quick fix?

@alexdima
Copy link

alexdima commented Dec 2, 2020

I've pushed microsoft/vscode@44dafcc which could help here. But basically the inspect tokens widget is not prepared to deal with TM scopes, it can only deal with flat tokens. That is why in the workbench we have another inspect tokens widget that understands TM scopes better. But in any case, an EncodedTokensProvider can now optionally provide tokens "not encoded" which would then show up in the inspect tokens widget.

@shshaw
Copy link
Author

shshaw commented Dec 7, 2020

Thanks for the breakdown, @alexdima. Will that change will make its way into monaco-editor at some point?

@alexdima
Copy link

alexdima commented Dec 8, 2020

Yes, I plan to release a new monaco-editor version sometime in the next couple of weeks

@Christiano300
Copy link

I've recently encountered this issue, have there been any changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants