microsoft / microsoft/monaco-editor

[Bug] "Developer: Inspect Editor Tokens and Scopes" causes error

Open
#4,463 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Reproduction Steps

No response

Actual (Problematic) Behavior

The syntax highlighting for my language wasn't working, so I tried to open the tokenization inspector, which resulted in this alert:
image

Expected Behavior

Expected the Token inspector to open up

Additional Context

I am using the monaco-editor-wrapper, but I don't think it causes the issue. I also can't reproduce this issue anywhere else. This is the minimal reproducible example I could get.

  const wrapper = new MonacoEditorLanguageClientWrapper();
  const userConfig: UserConfig = {
    wrapperConfig: {
      editorAppConfig: {
        $type: "classic",
        useDiffEditor: false,
        languageId: "json"
      },
    },
  };
  const htmlElement = document.getElementById("monaco-editor-root")!;
  await wrapper.initAndStart(userConfig, htmlElement);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported TypeScript configuration using MonacoEditorLanguageClientWrapper and the Developer: Inspect Editor Tokens and Scopes command. Investigate why the tokenization inspector raises an alert in this setup, then verify that the inspector opens with the supplied JSON language configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.