tomjs / vite-plugin-vscode

用 vue/react 来开发 vscode extension webview ,支持 esm 和 cjs。Use vue/react to develop vscode extension webview, supporting esm and cjs.
MIT License
41 stars 6 forks source link

How to debug webview code? #18

Closed hellozyemlya closed 1 month ago

hellozyemlya commented 1 month ago

First of all, many thanks for extension, it works as described and very well.

Question is - how I can connect debugger to resulting iframe and actually debug webview typescript code with build in vs code debugger or any other debugger? Thanks in advance.

tomgao365 commented 1 month ago

Hi @hellozyemlya , now you can try v3.10+. During development, support standalone development tool applications for react and vue, enabled by default.

hellozyemlya commented 1 month ago

@tomgao365 wow, that is cool, many thanks. Not exactly what I wanted\asked for, but will be helpful(I really struggled a lot once, where failed with slow react rendering... it forced me to mock out all vs code api and run webview directly in browser).

But is there some vite plugin or other way that will expose port connectable\attachable via regular debugger, like vs code one build in, or jetbrains webstorm?

Regardless, having react-devtools is super cool!

tomgao365 commented 1 month ago

@hellozyemlya 😂 Sorry, I haven't studied this type of debugger. You can only see if there are other Vite plugins that support it.

hellozyemlya commented 1 month ago

@tomgao365 no problems. I realized that this is probably a question for VS Code team itself. I guess you can close this issue if you want.