How To Debug a vscode extension's WebView javascript
Asked Answered
V

2

9

I am building a vscode extension, but I cannot set breakpoints in the Javascript in the WebView. Is there a way to debug the Javascript, even though the WebView is a separate process? Specifically, I am trying to incorporate a Telerik TreeView/TreeList and it is not displaying. The HTML and Javascript will display, in a self-contained data version, not using postMessage, if saved off to an HTML file and loaded into a browser. It is most likely a problem in my code, but I need a way to debug it. Thank you.

Vincennes answered 2/10, 2018 at 17:12 Comment(0)
D
19

Use the following command: Open Webview Developer Tools

Delusion answered 16/8, 2019 at 8:32 Comment(3)
Press ctrl + shift + p in the vscode and type Open Webview Developer ToolsSirotek
Is it possible to launch Developer Tools along with starting webview (to be able to set breakpoint during its initialization)?Mortify
I figured out that if I put a console.log statement in my webview js then the message which gets printed comes with a link to the source code so I can set a breakpoint in the Webview Developer Tools side panel.Hydroid
V
1

I haven't solved my problem, but a page I had read 10 times explained how to debug a WebView in vscode. I should be able to figure it out from here. RTFM .

Vincennes answered 2/10, 2018 at 22:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.