Developer: Inspect Tokens menu won't load
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?
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.
Yeah, I've hit this as well :( @alexdima any chance you could point me at a quick fix?
I've pushed https://github.com/microsoft/vscode/commit/44dafcc8408a3645e61b87af76e05c063b428f40 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.
Thanks for the breakdown, @alexdima. Will that change will make its way into monaco-editor at some point?
Yes, I plan to release a new monaco-editor version sometime in the next couple of weeks
I've recently encountered this issue, have there been any changes?