The Projects extension manages Pascal projects in VS Code. It provides project templates, configuration dialogs, and solution management.
The Projects extension enables:
| Command | Description |
|---|---|
WvdS Projects: New Project (Quick) | Creates a project with default settings |
WvdS Projects: New Project from Template… | Shows the template selection dialog |
WvdS Projects: Open Project | Opens an existing project |
WvdS Projects: Project Settings… | Opens the project settings dialog |
The extension includes predefined templates for various project types:
Simple console application for command-line tools and services.
Generated Files:
MyProject/ MyProject.lpr -- Main program
Example Code:
program MyProject; {$mode objfpc}{$H+} uses SysUtils; begin WriteLn('Hello, World!'); end.
Use Cases:
Native desktop application with LCL (Lazarus Component Library).
Generated Files:
MyProject/ MyProject.lpr -- Main program MainForm.pas -- Main form unit MainForm.lfm -- Form design
Prerequisites:
Use Cases:
Shared library (DLL/SO) for plugin systems or external integration.
Generated Files:
MyProject/ MyProject.lpr -- Library project
Example Code:
library MyProject; {$mode objfpc}{$H+} uses SysUtils; procedure HelloWorld; cdecl; begin WriteLn('Hello from library!'); end; exports HelloWorld; begin end.
Use Cases:
Terminal User Interface - text-based user interface.
Generated Files:
MyProject/ MyProject.lpr -- Main program TuiMain.pas -- TUI main unit
Use Cases:
Progressive Web App with pas2js - runs in the browser.
Generated Files:
MyProject/ MyProject.lpr -- Main program (becomes JS) index.html.tmpl -- HTML template manifest.json.tmpl-- PWA manifest sw.js -- Service Worker
Prerequisites:
Use Cases:
VS Code extension in Pascal, transpiled with pas2js.
Generated Files:
MyExtension/ extension_main.pas -- Entry point package.json.tmpl -- Extension manifest
Prerequisites:
Use Cases:
Windows installer for desktop applications.
Generated Files:
MyInstaller/ MyInstaller.iss -- Inno Setup script
Prerequisites:
Use Cases:
The WvdS Projects: Project Settings… dialog provides a graphical interface for:
VS Code workspaces can contain multiple projects:
MyWorkspace.code-workspace MyApp/ -- Desktop application MyLib/ -- Shared library MyTests/ -- Unit tests
File → Add Folder to Workspace…File → Save Workspace As…With multiple projects:
Right-click on .lpi/.lpr files in the Explorer shows:
WvdS Projects: Project Settings…Cause: Extension not activated or error.
Solution:
Cause: No .lpr, .dpr, or .pas file in the folder.
Solution:
File → Open Folder…Cause: No write permissions or faulty configuration.
Solution:
| Property | Value |
|---|---|
| Extension ID | wvds.wvds-vscode-projects |
| Activation | workspaceContains:/*.lpr, onLanguage:pascal |
| Dependencies | wvds-vscode-core |
| Min. VS Code | 1.85.0 |