-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
How do you use this extension to debug a vite app? #18
Comments
I've been trying to figure this out as well. Based on looking into the vscode-browse-lite that this extension depends on, I tried adding a configuration in
but it gives me the error:
I'm wondering if the values here need to be updated to "pwa-chrome" instead of "chrome". This is just a wild guess, I really don't know much about this. |
In reality, you don't need this extension to perform debugging in VSCode. First save the
|
That launch.json config will open a new Chrome window (outside of VS Code), correct? I think the intention of this issue is to figure out how to attach the debugger to the embedded browser that this plugin opens within VS Code. The benefit being that you can interact with the app within the embedded browser to trigger breakpoints, etc. |
yes, that will open a new external chrome browser window outside of VS Code. |
I think we're talking about two different things 😄 The process you're describing is a way to attach a VS Code debugger to an external Chrome window, which is unrelated to this plugin. But the question is, how do we attach the VS Code debugger to the embedded Chrome window that this plugin opens within a VS Code panel? That's a separate situation and requires a different (To be clear, the process you described is a great approach if you don't care about using this plugin. It's what I'm currently doing, too. But I'm still curious whether it's possible to attach the VS Code debugger to the embedded browser this plugin opens.) |
I also couldn't attach the VS Code debugger to the embedded window. |
@antfu this might be very easy to answer for you! I wasn't satisfied with the debugging-experience of the MS Edge Devtools Extension and came to vscode-vite to find a better experience. I'm sure this is possible, but I don't know how to configure my I'm getting the same error as @genericGenie:
with this as my {
"version": "0.2.0",
"configurations": [
{
"type": "browse-lite",
"name": "Browse Lite: Attach",
"request": "attach"
},
{
"type": "browse-lite",
"request": "launch",
"name": "Browse Lite: Launch",
"url": "http://localhost:4000"
}
]
} I've tested it with:
|
Same here. Please @antfu, any suggestions on which launch.js to use? |
I got this working. What I did:
{
"type": "browse-lite",
"request": "attach",
"name": "Browse Lite: Attach"
} No need for the "Browse Lite: Launch" configuration when starting the Vite server with the extension. I can place break points and step through the code as expected. System info:
|
I cannot see how to break on breakpoints in the components code ? Is it possible with this extension ? Is there some configuration to add to vscode ?
The text was updated successfully, but these errors were encountered: