4D Blog

Home Product Workspace Syntax Checking in VS Code editor

Workspace Syntax Checking in VS Code editor

May 7, 2024

Product

4D 20 R5 brings a new capability to the Visual Studio Code editor through the 4D-Analyzer extension: Say hello to Workspace Syntax Checking, designed to significantly reduce developer errors and streamline coding precision.

What is a workspace?

In VS Code, a workspace is a set of folders opened in a single window. Each workspace folder can contain one 4D project.

The workspace is valuable when using several projects simultaneously. Note that a single 4D project open in a VS Code window is considered a workspace.
Syntax checking is a way of helping developers make their code more secure.
Checking the syntax of the document being edited has been available since 4D 20.

Starting with 4D 20 R5, syntax checking can be performed on the entire current 4D project, as soon as a 4D method/class file is opened. This means you can see errors and warnings in the whole project at a glance!

Errors and warnings found in the workspace are displayed in the dedicated pane to the left of the VS Code status bar. The number of errors is on the left, and the number of warnings is on the right.
VS Code offers the option to view error and warning details. Simply click on the pane described above, and the problems pane opens. You can also open it via the “View/Problems” menu. Errors are marked in red and warnings in orange.
The problems pane displays all errors and warnings in the workspace, grouped by method file. Simply double-click on a line to open the corresponding file in the code editor pane, with the cursor positioned on the error/warning line.
It’s so easy to use!

The best part? You don’t have to do a thing—it’s all automatic. Simply open a 4D method/class file, and syntax checking is performed on the corresponding project. The same applies as soon as a modification is saved.
In VS Code, syntax errors and warnings are also displayed inline: the part of the code generating the error or warning is underlined. When you move the mouse over it, a tooltip appears, showing the same explanation of the error or warning as in the 4D code editor:

blank

As some developers don’t like to see their code underlined by the editor, we’ve followed the example of other VS Code language extensions by making this feature optional. You can enable or disable syntax checking in the extension settings:

blank

We’ve also added a VS Code command called “Check Workspace Syntax” for manual execution. So, if the size of your project slows down the code editor too much, you can disable automatic syntax checking or set it to check only the current document and then manually check the workspace syntax whenever you like!

blank

We strive to provide our users with the best possible experience, and we encourage you to share your thoughts and comments on the 4D forum. Your feedback helps us understand your needs and continually improve our products and services.
Happy coding!

Discuss

Tags 20 R5, 21, 4D-Analyzer, Code editor, vscode

Latest related posts

  • October 23, 2025

    Starting Qodly studio is just two clicks away

  • October 22, 2025

    Localize your Qodly Pages: A Practical Guide

  • October 21, 2025

    New Way to Control Your HTTP Responses

Avatar
Damien Fuzeau
- Product Owner - Damien Fuzeau joined the 4D Product team in February 2019. As a Product Owner, he is responsible for writing user stories and translating them into functional specifications. His role also involves ensuring that the delivered feature implementations meet customer needs. Damien holds a degree in Software Engineering from the University of Nantes. He spent over 23 years at his previous company, first as a developer (discovering 4D in 1997), and later as Engineering Manager and Software Architect. The company was an OEM partner of 4D and deployed enterprise software based on 4D for thousands of users across hundreds of servers. Damien is therefore well-versed in 4D development and deployment in multilingual environments.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor

Tags

4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience v20 vscode Web Word processor
Subscribe to 4D Newsletter

© 2025 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy