Skip to content

Extensions can't work with large files #3147

@HookyQR

Description

@HookyQR

VS Code doesn't provide the document element of the editor when a large file is open. This means that extensions can't get any file information at all.

Editing still works fine, even a (large number of) find/replace functions work.

Using registerTextEditorCommand fails to enter the callback function at all (presumably the exception is thrown when the arguments to the callback are created) and trying to access the document via the activeTextEditor in registerCommand fails (throws) when attempting to access the .document getter of the TextEditor object. Inspecting the activeTextEditor object shows that _documentData is undefined

I've had this failure with a 6MB file. Yet editing, and highlighting (JSON) work on a 16MB file.

Metadata

Metadata

Assignees

Labels

verifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions