Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox dev tools: change JS execution context

Chrome dev tools allow to change javascript execution context.

enter image description here

It's very handy and I use it a lot in the debugging process.

But I need to test my project in Firefox and I can't find UI to change the execution context.

Does the Firefox has this feature?

like image 208
Eugene Karataev Avatar asked Nov 22 '18 08:11

Eugene Karataev


1 Answers

The Firefox DevTools have the same feature.

When a page contains at least one iFrame, there is a new button at the upper right corner of the DevTools window:

Button to select an iframe

Clicking this button opens a menu, which allows you to select the iframe. Hovering over the different entries even highlights the iframe or main document within the page to make it easier to identify them:

Menu to select the iframe and highlighting the hovered iframe

In contrast to the Chrome DevTools, this feature changes the context in all the panels, e.g. the Inspector will also be restricted to the document of the selected iframe.

You may need to enable it first. To do so, open the Settings panel (e.g. by pressing F1), then check the option Select an iframe as the currently targeted document:

Option to toggle the feature to select an iframe

like image 54
Sebastian Zartner Avatar answered Sep 22 '22 15:09

Sebastian Zartner