Tokenization is skipped for long lines for performance reasons. The length of a long line can be configured via `editor.maxTokenizationLineLength`

Viewed 18331

I'm at a loss here. I have a Node.js server built for my project and out of nowhere, I started getting this error when I try to run the server in VSCode:

Tokenization is skipped for long lines for performance reasons. The length of a long line can be configured via editor.maxTokenizationLineLength.

I had edited some of my functions in my controller before this started. I discarded all changes but the error still persists. I don't understand what has changed for this to happen. Any advice would be greatly appreciated.

My code is here if you want to take a look https://github.com/Kevinclane/timeclock

3 Answers

I fixed this problem by increasing Max Tokenization Length in VSCode :

  1. Go to File--> Preferences--> Setting
  2. Search for Max Tokenization Length enter image description here
  3. Change the default value to 2000000

I hope this will help

enter image description here

Apparently, just toggling the options for breakpoints on caught and uncaught exceptions causes it to fail... Doesn't make sense, but it works now.

This is not actually an error as such. If you assign really long length string to a variable, you might see this:

enter image description here

However, you will be still able to use that variable.

Related