PinkaminaDianePie / error-gutters

VSCodium (Visual Studio Code) error gutters
Other
18 stars 1 forks source link

Console errors #1

Closed Gruntfuggly closed 5 years ago

Gruntfuggly commented 5 years ago

I'm getting loads of errors in the console:

mainThreadExtensionService.ts:43 TypeError: Cannot read property 'document' of undefined
    at checkFile (/Users/nige/.vscode/extensions/igorsbitnev.error-gutters-1.0.0/extension.js:38:27)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:103:659
    at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:105:344)
    at Timeout._onTimeout (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:108:359)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

Which is making it quite hard to debug my own extension.

I think it's because some editors (settings, extensions, etc.) don't have a document.

BTW - nice extension. Not sure why it's not built in?

PinkaminaDianePie commented 5 years ago

Just added the checks, it should not run the extension for such editors, please check if it works for you.

There is no clear reason why it wasn't implemented - such feature request exists for years, no one rejected it, but no one wanted to work as well: https://github.com/Microsoft/vscode/issues/9209

Gruntfuggly commented 5 years ago

Sorted - thanks!