microsoft / microsoft/monaco-editor
[Bug] debugger; statement in diffAlgorithm.ts
Open
Nobody has claimed this yet.
under-discussion
- 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?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
Monaco Editor Playground Code
const originalModel = monaco.editor.createModel(
'foo bar \n'.repeat(10000),
"text/plain"
);
const modifiedModel = monaco.editor.createModel(
'foo foo bar \n'.repeat(10000),
"text/plain"
);
const diffEditor = monaco.editor.createDiffEditor(
document.getElementById("container"),
{
originalEditable: true,
automaticLayout: true,
}
);
diffEditor.setModel({
original: originalModel,
modified: modifiedModel,
});
Reproduction Steps
- Open dev tools
- Load playground with large diff
- Will eventually break at debugger statement
Actual (Problematic) Behavior
debugger; :
Expected Behavior
No debugger;
Additional Context
Just upgraded monaco from a pretty old version and now keep getting stuck in the debugger statement while navigating in my app (I work with a lot of large diffs).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.ts around line 188, then reproduce the issue with the linked Monaco playground and its large diff. Confirm that navigating or loading the diff no longer pauses at a debugger statement, while the diff still works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100