question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support large documents in extension host

See original GitHub issue
  • VSCode Version: 1.14.1
  • OS Version: Windows 7 and Windows 10, likely all OSes

When editing documents with very long lines, such as lines containing data-URIs, the property vscode.window.activeTextEditor will be undefined when it should be defined.

Steps to reproduce:

  1. Create a new (blank) VSCode extension, and add this command to extension.ts:
'use strict';
import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
    let disposable = vscode.commands.registerCommand('bigDocTest.runDocTest', () => {

        let hasActiveTextEditor = (vscode.window.activeTextEditor !== undefined);

        if (hasActiveTextEditor) {
            vscode.window.showInformationMessage('Success, activeTextEditor is defined.');
        } else {
            vscode.window.showErrorMessage('Oops, activeTextEditor is not defined.');
        }
    });

    context.subscriptions.push(disposable);
}

export function deactivate() {
}
  1. Launch this extension, load any normal text file, and run this command, you see the “Success, activeTextEditor is defined” information message appear.

  2. But, try loading a file with a very long line contained inside it, such as this one: MetalRoughSpheres.gltf. This file has long lines due to the use of embedded data URIs in the file. If you run the above sample extension while editing this file, you see “Oops, activeTextEditor is not defined.”

This makes it difficult for VSCode extensions to work with such files. I’m the lead dev of the GLTF extension for VSCode, and this prevents my extension from running on GLTF files that embed large images as data URIs.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:121
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

40reactions
vscodebot[bot]commented, Jan 18, 2020

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

4reactions
Leonid-Kokhnovych-Riviancommented, Dec 22, 2020

It would be great for the user to be able to configure it at least. I work with log files of max 200MB using Visual Studio Code and since there is no native filtering using line or regex (include/exclude), I can’t filter the log file through third-party extension either…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Large file support for extensions - Visual Studio Marketplace
Extension that allows to open large files so that other extensions can work with them. Installation. Launch VS Code Quick Open ( Ctrl+P...
Read more >
Enhance security and simplify network integration with ...
The implementation of Extension Host requires two wild card SSL certificates, one for the Admin portal and one for the Tenant portal. Customers ......
Read more >
VSCode Python Extension: Extension host terminated ...
Is there any way to find out what is breaking it? I can successfully open and run Python files in remote WSL instances...
Read more >
File Provider | Apple Developer Documentation
An extension other apps use to access files and folders managed by your app and ... The extension hosts and manages the files...
Read more >
Upload files and folders to Google Drive - Computer
Important: Make sure you have the Save to Google Drive Extension installed. On your computer, open Chrome. Open the page, image, or file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found