KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Turn off tokens for easier reading in Visual Studio Code
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: June 12, 2023

Although 4D already has a built-in integrated development environment, a.k.a., IDE, to allow developers to implement code within the application, Visual Studio Code (VS Code) is also a great alternative as a code editor for the 4D language; with the recent addition of the all-new 4D VS Code extension, standard functions such as syntax highlighting, type ahead, and more are now available in the third-party IDE.

When opening a method in VS Code, you may see the tokens in the editor area:



These would be automatically hidden in the 4D IDE and would allow commands, variables, etc. be styled for easier reading:




To get rid of these tokens in future code, you can uncheck the "Include tokens in project source files" setting by going to the "4D" menu item > Settings... > When creating a new project > uncheck "Include tokens in project source files" (see below).


Turning off this setting does not affect code that was already implemented, however. You will need to export and import your project methods to refresh the code and remove the tokens. You can do this by using the example code on the METHOD SET CODE documentation page: https://doc.4d.com/4Dv19R8/4D/19-R8/METHOD-SET-CODE.301-6102795.en.html.

Once you have exported and imported your project methods, the code should look like this in VS Code: