-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging documentation doesn't address virtual host name mapping #2157
Comments
Thanks for reaching out. |
Thanks! For the record, I was eventually able to get debugging via VS Code working on my app (which uses TypeScript, is bundled via Parcel 2, and runs inside a WebView2 that uses SetVirtualHostNameToFolderMapping). I ended up having to set |
Thanks for sharing. This might be very useful to others. |
Link to the documentation page:
https://docs.microsoft.com/en-us/microsoft-edge/webview2/how-to/debug-visual-studio-code
Description of the issue:
The example
launch.json
sets the URL to a "file" protocol URL, but the WebView2 "getting started" docs suggest usingSetVirtualHostNameToFolderMapping
to map HTTP URLs to local folders.How do you tell VS Code that "https://example.com/" is actually loaded from the file system, e.g. for loading source maps?
When I attempt to debug my WebView2 app which has a script mapped to "https://example.com/index.js", VS Code actually tries to request the source map from "https://example.com/index.js.map" instead of reading from my local file system, which makes me think that additional flags in the
launch.json
file are required.Given that virtual host name mapping seems to be recommended, the debugging instructions should cover how to debug mapped files.
AB#41242137
The text was updated successfully, but these errors were encountered: