This document describes the complete process from setting up the development environment to building the ThymeLab VSCode Extension.
- Node.js (v18 or higher)
- npm (comes with Node.js)
- Visual Studio Code
- Java Development Kit (JDK) 11 or higher
- VS Code Extension Manager (vsce):
npm install -g @vscode/vsce
git clone https://github.com/thkwag/thymelab-vscode.git
cd thymelab-vscodenpm installKey dependencies:
@types/vscode: VS Code API type definitionstypescript: TypeScript compilerwebpack: Module bundlerts-loader: TypeScript loaderaxios: HTTP clientminimatch: File pattern matching
Check the following settings in .vscode/launch.json:
Run VSCode Extension: Run the extensionDebug ThymeLab Processor: Debug Java processorExtension + Server: Run both extension and server simultaneously
npm run compile # Single compilation
npm run watch # Watch mode for automatic compilationnpm run lint- Open the extension in VS Code
- Press F5 to start debugging
- A new VS Code window will open with the extension loaded
- Use the extension and check the Debug Console for logs
- Set breakpoints in the TypeScript files
- Use the Debug Console to inspect variables
- Use the Debug toolbar to control execution
- Check Output panel for extension logs
- TypeScript compilation:
npm run compile- Webpack bundling:
npx webpack --config webpack.config.jsnpm run packageThis command:
- Creates build directory if it doesn't exist
- Compiles TypeScript code
- Creates VSIX package
- Moves the generated VSIX file to the
buildfolder
The generated VSIX file can be found at build/thymelab-[version].vsix.
thymelab-vscode/
├── src/ # Source code
│ ├── extension/ # VS Code extension core code
│ └── test/ # Test code
├── dist/ # Compiled JavaScript files
├── build/ # Build artifacts (VSIX)
├── resources/ # Resource files
├── docs/ # Documentation
└── syntaxes/ # Syntax definitions
distfolder contains compiled JavaScript filesbuildfolder contains the final VSIX package- Remember to update the version field in
package.jsonwhen updating the version - Always test the extension in a new VS Code window before packaging
- Check the extension logs in the Output panel for debugging
- Use ESLint for code style consistency
- Update version in
package.json - Update CHANGELOG.md
- Run all tests and ensure they pass
- Build and test the extension locally
- Create a new tag:
git tag v1.x.x git push origin v1.x.x
- Create a new release on GitHub
- Attach the VSIX file to the release
- Update the release notes
- Ensure you have a Microsoft account
- Get a Personal Access Token from Azure DevOps
- Publish using vsce:
vsce publish
-
Build Failures
- Check Node.js version
- Delete node_modules and reinstall
- Clear the VS Code extension development host
-
Runtime Errors
- Check the Debug Console
- Check the Output panel
- Verify Java version and path
-
Packaging Issues
- Ensure vsce is installed globally
- Check package.json for errors
- Verify all required files are included