In firebug, you can use the cd
command to change the console context to an iframe. I need this when developing a facebook app to debug my javascript inside the iframe.
How do you do this in google chrome?
To open the developer console in Google Chrome, open the Chrome Menu in the upper-right-hand corner of the browser window and select More Tools > Developer Tools. You can also use Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux).
At its simplest, the Sources tab allows you to set breakpoints and evaluate expressions in Javascript whether that Javascript was loaded from a separate file or was part of the page as illustrated in figure 1, below, which is a screen shot of the very simple Example 1.
No "cd" command yet, but it seems that we'll have a "dropdown list with all iframes to allow selecting current evaluation context for console expressions" in upcoming releases.
See http://trac.webkit.org/changeset/91839
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With