-
Notifications
You must be signed in to change notification settings - Fork 45
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
Chrome Dev Tools Scope #50
Comments
Hmm, that's a good question. I didn't make any changes that would have impacted this, but it's possible that the VS Code WebView changed? Let me take a quick look, and see if I can figure anything out. Stay tuned! // CC @egamma in case he's aware of anything that might have changed here |
Thanks! My own config/extension setup hasn't changed, but I'll check in the interim with a fresh VSCode install to see if perhaps there's a conflict with another extension that I'm not seeing. |
//CCing @deepak1556 @connor4312 for electron and debug insights. @stephancasas can you please provide steps for how to reproduce the issue for someone that isn't familiar with the CodeSwing extension. |
@egamma, after installing the extension, run the Then, choose one of the pre-defined templates. Here, I'm using the Next, use either the toolbar shortcut or the command palette to show developer tools, and use the context selector to choose the CodeSwing document/iframe component: That last step is where the trouble begins. Traditionally, the inspector would immediately focus on the CodeSwing doc, and remain focused. However, as the CodeSwing doc is saved/updated, focus is lost, and the context of the console/devtools returns to the Indeed, if we add some |
This is assuredly due to the move to iframe based webviews. I don't see functionality in electron's public API to open the DevTools pre-scoped to an existing target. Btw, the way we're assessing for the new Live Preview extension is using the Edge DevTools, which provide a remote browser preview in their VS Code extension. @codepo8 is the lead for that team. Maybe we can build infrastructure that's reusable for codeswing? (cc @andreamah -- do you know who will be taking over the Live Preview extension after your internship ends?) |
@connor4312 I believe that the vscode team as a whole will be maintaining the extension. |
I am talking to a few people and it seems the live extension will stay with
VS Code, but we may take on others, like the old preview extension.
…On Mon, Jul 26, 2021 at 5:59 PM Andrea Mah ***@***.***> wrote:
(cc @andreamah <https://github.com/andreamah> -- do you know who will be
taking over the Live Preview extension after your internship ends?)
@connor4312 <https://github.com/connor4312> I believe that the vscode
team as a whole will be maintaining the extension.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADJRC5ESFS75VED6ZA4KDTZWA6TANCNFSM5A7J6VSA>
.
|
Yup the current apis from electron only target to the top-level document, however we maybe able to target a particular frame if electron connects to https://source.chromium.org/chromium/chromium/src/+/main:content/browser/devtools/render_frame_devtools_agent_host.h. Created microsoft/vscode#129437 to check feasibility in debt week. |
We changed the behavior of It doesn't seem like we can easily go back to the old behavior. I think connecting the edge dev tools sounds like a better approach for this use case, as presumably you could also then hide all the webview implementation details from users so that they just see their code |
Hello,
Firstly, thank you for this amazing tool. CodeSwing is a part of my daily development workflow. I use it all the time — especially when building-up Tailwind components and fiddling with all of those utility classes.
At one point in time, it seemed like the Chrome DevTools integration was working really well, but it now seems that when I use them, the DevTools scope is set to
top
— giving me VSCode's Electron context instead of the CodeSwing preview window. If I adjust this, it retains for a moment, but then jumps back to thetop
context as soon as I save my swing to render the next preview.Is there something I'm missing or perhaps a setting I need to adjust? As this is a tool I use daily, I'm more than happy to troubleshoot and open a pull request, but before I start investigating, I figured I should first see if there's an easy fix.
Thanks!
The text was updated successfully, but these errors were encountered: