npm install
npm run watch
or npm run compile
F5
to start debuggingThe project register one command - showWebView
to change the command name
package.json
activationEvents
(which function to be called)contributes
-> commands
(how the command will be displayed in the dropdown)to change the title of the webview tab
extension.ts
viewingType
variable (optional)webViewTitle
variable (this is the actual title)To show the webview:
Ctrl + Shift + P
custom webview
Enter
The Svelte app is sending message to the extension when the only button is pressed. Follow the logic to understand how messages are passed between the webview and the extension. (the extension is listener is in extensions.ts
in webviewPanel.webview.onDidReceiveMessage ...
section)
Every time change is made - press Ctrl + Shift + F5
to refresh the extension instance window and start the webview again (see Webview
section above)
Ctrl + Shift + P
and search for Developer: Open Webview Developer tools
Chrome Dev Tools