You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When debugging a webpage with an iframe, iframes are not listed as session in VS Code:
However, chrome lists them as sessions:
Which is also convenient in the dev console:
In VS Code I cannot select the iframe as my target element in the dev console. This is especially problematic when the iframe has a different origin and is inaccessible from the main window - in that case there is no way to inspect global variables of the iframe while the execution is not paused in it.
I'm not actually sure why we don't have iframes be different debug sessions, but do for workers. (This was done in the prototype version of js-debug that I took over years ago.) Making them their own sessions would reduce complexity and allow a more natural target switching.
Looking more: in chrome iframes are not really separate sessions, just separate execution contexts. While some things are separate, other things are the same. For example, the state of the debugger (paused/resumed) is shared across all execution contexts, and therefore iframes. In DAP we don't have a way to represent this very well.
The fact the the CDP debugger is the same for all frames in the frame tree makes this hard to map to the current js-debug architecture which is 1:1 between CDP debuggers and debug session.
When debugging a webpage with an iframe, iframes are not listed as session in VS Code:
However, chrome lists them as sessions:
Which is also convenient in the dev console:
In VS Code I cannot select the iframe as my target element in the dev console. This is especially problematic when the iframe has a different origin and is inaccessible from the main window - in that case there is no way to inspect global variables of the iframe while the execution is not paused in it.
Probably #1432 is related.
demo.zip
The text was updated successfully, but these errors were encountered: