I really like VS Code, which I use primarily for JS and React (jsx). Sometimes when I code, a panel pops up with a message:
[Error - 13:45:45] Request textDocument/definition failed.
Message: Request textDocument/definition failed with message: Cannot read property 'charCodeAt' of undefined
Code: -32603
How can get rid of this error message or prevent opening a panel when Request textDocument/definition failed
?
When you see strange errors like your Request textDocument/definition failed
in any ecosystem with plugins, the best place to start hunting is in the error logs of that application. Errors like this normally show up when you update the core application, which will shift its own API enough to break contrib code like this.
In terms of VS Code specifically, it requires you turn on logging within the Help -> Toggle Developer Tools
menu, which then creates logs you can go scan.
Looks like you found the error pretty easily in the tern.js plugin you were using, but the same general flow for debugging big ecosystems like node.js, React and others follow this same pattern.
Quick google and found a SO link which says this is a know issue and a workaround is to open Visual Studio Code on a folder instead of a file.
https://stackoverflow.com/a/40631794/1249386
GitHub link : https://github.com/Microsoft/vscode/issues/15018 Let me know if this help you or not?
Could that be the vetur Plugin? It seems to have some language issues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With