A comprehensive VS Code extension providing complete PowerBASIC language support including syntax highlighting, code completion, PBFORMS DDT support, and full compilation/execution capabilities.
-
Syntax Highlighting: Full PowerBASIC syntax highlighting with support for:
- Keywords and control structures
- Data types and type modifiers
- String literals and escape sequences
- Comments (REM, apostrophe, and block comments)
- Preprocessor directives
- Built-in functions and procedures
- Operators and intrinsic constants
-
PBFORMS (DDT) Support: Complete syntax highlighting for Dynamic Dialog Tools:
- DIALOG statements and styles
- CONTROL ADD statements with all control types
- Dialog and control style constants (%DS_, %WS_, %BS_, %ES_, etc.)
- Callback function patterns
- Control operation statements
-
IntelliSense: Code completion for PowerBASIC keywords and functions
- Compile Only: Compile PowerBASIC source to executable
- Run: Execute compiled PowerBASIC programs
- Compile & Run: Build and execute in one command
- Error Detection: Built-in PBWIN.exe availability checking with error messages
- Wine Support: Automatic Wine integration for running on Linux hosts
Customize PowerBASIC compilation:
{
"powerbasic.pbwinPath": "C:\\PBWin10\\bin\\PBWin.exe",
"powerbasic.includeDirectory": "C:\\PBWin10\\WinAPI\\",
"powerbasic.useWineOnLinux": true
}- Install PowerBASIC Compiler for Windows
- Ensure PBWIN.exe is in your PATH or configure
powerbasic.pbwinPath - Install this extension from VS Code Marketplace
- Install Wine:
sudo apt-get install wine wine32 wine64 - Install PowerBASIC for Windows via Wine
- Set
powerbasic.useWineOnLinux: truein settings
- Ctrl+Shift+B: Compile current file
- Ctrl+F5: Run compiled executable
- Ctrl+Alt+B: Compile and Run
Press Ctrl+Shift+P and search for:
PowerBASIC: Compile Current FilePowerBASIC: Run Current FilePowerBASIC: Compile and RunPBFORMS: Show DDT Reference- View dialog and control style referencePBFORMS: Insert Control Template- Insert common control definitions
The extension includes comprehensive PBFORMS support:
- Full syntax highlighting for DDT code generation
- Quick reference for dialog and control styles
- Control template insertion
- See PBFORMS.md for complete DDT reference
Supported file extensions: .bas, .bi
The extension automatically:
- Saves your file before compilation
- Checks for PBWIN.exe availability
- Displays compilation errors and success messages
- Outputs executable in the same directory as the source file
- Includes the WinAPI directory in the compiler search path
- Verify PBWIN.exe is installed and in PATH
- Check
powerbasic.pbwinPathsetting:"powerbasic.pbwinPath": "C:/Program Files/PowerBASIC/PBWIN.exe"
- Restart VS Code
- Verify Wine is installed:
wine --version - Test PBWIN:
wine pbwin.exe /? - Enable debug output in VS Code terminal
- Check file syntax matches PowerBASIC specification
- Verify PBWIN.exe version compatibility
- Review error messages in Output panel
| Setting | Default | Description |
|---|---|---|
powerbasic.pbwinPath |
C:\PBWin10\bin\PBWin.exe |
Path to PBWIN.exe compiler |
powerbasic.includeDirectory |
C:\PBWin10\WinAPI\ |
Include directory path for PBWIN.exe compiler |
powerbasic.useWineOnLinux |
true |
Use Wine on Linux for PBWIN.exe |
This extension requires:
- VS Code 1.35.0 or later
- Node.js 12+ (for development)
# Install dependencies
npm install
# Run extension in development mode
# Press F5 in VS Code with this folder open- PowerBASIC compiler documentation: PowerBASIC Tools, LLC
- Built for VS Code 1.35.0+
See LICENSE file for details.
For issues, feature requests, or questions:
- GitHub: https://github.com/ReFil/vscode-powerbasic
- PowerBASIC: https://www.powerbasic.com/
PowerBASIC is a registered trademark of PowerBASIC Tools, LLC.