DAXE VSCode Plugin
A Visual Studio Code extension for writing and executing DAXE proprietary code with server-side compilation and execution.
Features
- Syntax Highlighting: Full syntax highlighting for DAXE files (.daxe, .dax)
- Authentication: Secure authentication with configurable server endpoint
- Token Management: Automatic JWT token refresh (proactive and reactive)
- Code Execution: Execute entire files or selected code snippets
- Error Display: Inline error diagnostics and detailed output panel
- Status Bar: Visual authentication status indicator
- Activity Bar: Dedicated DAXE Code Runner panel with three views:
- Configuration View: Monitor server settings, authentication status, and endpoints
- Debug Output: Real-time execution logs with color-coded levels
- DAXE Explorer: Browse and open available DAXE programs from server
Installation
- Download the
.vsix file from the releases page
- Open VSCode
- Go to Extensions view (Ctrl+Shift+X)
- Click the "..." menu and select "Install from VSIX..."
- Select the downloaded file
- Reload VSCode window when prompted
Usage
Initial Setup
- Open VSCode Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run
DAXE: Authenticate
- Enter your server URL (e.g.,
https://api.example.com)
- Enter your username and password
Using the Activity Bar
- Click the DAXE Code Runner icon in the Activity Bar (left sidebar)
- Explore the three views:
- Configuration: Check your authentication status and server settings
- Debug Output: Monitor real-time execution logs
- DAXE Explorer: Browse and open available DAXE programs
Running Code
- Open a
.daxe or .dax file
- Use one of the following methods:
- Run entire file: Command Palette →
DAXE: Run Current File
- Run selection: Select code → Command Palette →
DAXE: Run Selected Code
- View results in the Output panel and Debug Output view
Commands
DAXE: Authenticate - Login to the DAXE server
DAXE: Run Current File - Execute the current file
DAXE: Run Selected Code - Execute selected code
DAXE: Logout - Logout from the server
GitHub Copilot Integration
The extension includes a custom AI assistant powered by GitHub Copilot. You can interact with it through VS Code's chat interface:
- Open Chat: Use
Ctrl/Cmd+Shift+I or Command Palette → "Chat: Focus on Chat View"
- Use DAXE Assistant: Type
@daxe followed by your question
- Get Help: Ask about syntax, debugging, code execution, or general DAXE questions
Example interactions:
@daxe how do I authenticate?
@daxe help me debug this code
@daxe explain this DAXE syntax
@daxe how do I run selected code?
The assistant provides:
- Authentication guidance
- Code execution help
- Debugging assistance
- Syntax explanations
- Integration with your DAXE server context
Configuration
You can configure the extension through VSCode settings:
{
"daxe.serverUrl": "https://api.example.com",
"daxe.debug": false
}
API Endpoints (Placeholder)
The extension expects the following endpoints on your server:
POST /auth - Authentication
Request: { "username": "string", "password": "string" }
Response: { "access_token": "string", "refresh_token": "string", "expires_in": 3600 }
POST /refresh - Token refresh
Request: { "refresh_token": "string" }
Response: { "access_token": "string", "refresh_token": "string", "expires_in": 3600 }
POST /execute - Code execution
Request: {
"code": "string",
"parameters": {
"source": "filename.daxe",
"timestamp": "2023-01-01T00:00:00Z"
}
}
Response: {
"success": true,
"output": "string",
"errors": [{
"line": 10,
"column": 5,
"message": "Error description",
"severity": "error"
}]
}
POST /daxe/getAll-daxe-program?moduleId={moduleId} - Get all DAXE programs
Request: {} // Empty body, moduleId is optional query parameter
Response: [{
"id": "string",
"name": "string",
"moduleId": "string",
"description": "string",
"type": "string",
"lastModified": "2023-01-01T00:00:00Z"
}]
Security
- Tokens are stored securely using VSCode's SecretStorage API
- Automatic token refresh on expiration
- All API calls use HTTPS
Development
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
- VSCode
Building
# Install dependencies
npm install
# Compile TypeScript and bundle dependencies
npm run compile
# Create production bundle and package extension
npm run package
Packaging for Distribution
The extension uses webpack to bundle all dependencies (including axios, jwt-decode) into a single file for VS Code compatibility.
Build Process:
npm run compile - Creates development bundle with webpack
npm run package - Creates production bundle and generates .vsix file
npx vsce package - Alternative command to package (runs automatically in step 2)
Key Files:
webpack.config.js - Bundles dependencies for VS Code extension format
package.json scripts - Uses webpack instead of TypeScript compiler alone
Troubleshooting Packaging:
- If extension works in development but fails when packaged, check that all node_modules dependencies are properly bundled
- Verify
.vsix file size increased appropriately (should be ~99KB with dependencies vs ~67KB without)
- Use
npx vsce package --out filename.vsix to specify output filename
Testing
# Run tests
npm test
# Open VSCode with extension loaded
code --extensionDevelopmentPath=.
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is proprietary software. All rights reserved.
Troubleshooting
Activity Bar Icon Visible but No Views
If you see the DAXE icon in the Activity Bar but clicking it shows no views:
Activate the Extension
- The extension needs to be activated first
- Open any
.daxe file OR run DAXE: Authenticate command
- This triggers extension activation
Check Extension Status
- Command Palette → "Developer: Show Running Extensions"
- Verify "DAXE Code Runner" is in the list and activated
Reload Window
- Command Palette → "Developer: Reload Window"
- This restarts the extension host
Manual View Focus
- Command Palette → Type "View: Focus"
- Look for "DAXE Configuration" or other DAXE views
Check Console for Errors
- Open Developer Tools (Cmd/Ctrl+Shift+I)
- Check Console tab for any DAXE-related errors
What You Should See
When working correctly, clicking the DAXE icon opens a sidebar with:
- Configuration section (collapsible)
- Debug Output section (collapsible)
- DAXE Code Explorer section (collapsible)
Each section can be expanded/collapsed and will show relevant information.
Support
For issues and feature requests, please contact your system administrator or create an issue in the project repository.