The gui directory holds a self-contained Angular application - created with the Angular CLI. It is encouraged to begin developing the webview UI as a separate Angular application by running the npm run start:gui command and then editing the code in the gui\src directory.
The application can than be run in a Chrome or Edge instance by running either the Debug GUI (Chrome)or Debug GUI (Edge) launch configuration:
- Bring up the
Run and Debugactivity via theRun and Debugicon in theAcivity Bar. Or use the shortcutCrl+Shift+D(See the Debugging VSCode Guide) - Select
Run and DebugorRun and Debugin theLaunch Configurationsdropdown menu - Press the
Start Debuggingbutton orF5key.
The Run and Debug view can then be used to debug the application.
Alternative:
To run in a browser environment inside VSCode:
- Open the
Command Palette(Ctrl+Shift+P) - Run
Simple Browser: Show - Fill in
http://localhost:4200/
To debug, use the Developer Tools
- Open the
Command Palette(Ctrl+Shift+P) - Run
Developer: Open Webview Developer Tools
- Bring up the
Run and Debugactivity via theRun and Debugicon in theAcivity Baror use the shortcutCrl+Shift+D - Select
Run Extensionin theLaunch Configurationsdropdown menu - Press the
Start Debuggingbutton orF5key.
This will compile the extension and open a new Extension Development Host window in which the functionality of the extension can be tested and debugged.
See Commands for available commands.