Firefox dev tools: change JS execution context












0















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?










share|improve this question























  • See workarounds in How to access add-on content script in Firefox console?

    – wOxxOm
    Nov 22 '18 at 8:51













  • Thanks for the link, but it doesn't helpful in my case. I want to execute a function in the extension's javascript context to trace current state. It seems impossible to do with Firefox dev tools. The only workaraound I see is to add a listener in the content to execute the required function and trigger the execution from the background scripts.

    – Eugene Karataev
    Nov 22 '18 at 9:29













  • You should clarify in your question that you refer to extension development and not to website development.

    – Sebastian Zartner
    Nov 23 '18 at 7:41
















0















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?










share|improve this question























  • See workarounds in How to access add-on content script in Firefox console?

    – wOxxOm
    Nov 22 '18 at 8:51













  • Thanks for the link, but it doesn't helpful in my case. I want to execute a function in the extension's javascript context to trace current state. It seems impossible to do with Firefox dev tools. The only workaraound I see is to add a listener in the content to execute the required function and trigger the execution from the background scripts.

    – Eugene Karataev
    Nov 22 '18 at 9:29













  • You should clarify in your question that you refer to extension development and not to website development.

    – Sebastian Zartner
    Nov 23 '18 at 7:41














0












0








0








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?










share|improve this question














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?







google-chrome-devtools firefox-developer-tools






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '18 at 8:49









Eugene KarataevEugene Karataev

267




267













  • See workarounds in How to access add-on content script in Firefox console?

    – wOxxOm
    Nov 22 '18 at 8:51













  • Thanks for the link, but it doesn't helpful in my case. I want to execute a function in the extension's javascript context to trace current state. It seems impossible to do with Firefox dev tools. The only workaraound I see is to add a listener in the content to execute the required function and trigger the execution from the background scripts.

    – Eugene Karataev
    Nov 22 '18 at 9:29













  • You should clarify in your question that you refer to extension development and not to website development.

    – Sebastian Zartner
    Nov 23 '18 at 7:41



















  • See workarounds in How to access add-on content script in Firefox console?

    – wOxxOm
    Nov 22 '18 at 8:51













  • Thanks for the link, but it doesn't helpful in my case. I want to execute a function in the extension's javascript context to trace current state. It seems impossible to do with Firefox dev tools. The only workaraound I see is to add a listener in the content to execute the required function and trigger the execution from the background scripts.

    – Eugene Karataev
    Nov 22 '18 at 9:29













  • You should clarify in your question that you refer to extension development and not to website development.

    – Sebastian Zartner
    Nov 23 '18 at 7:41

















See workarounds in How to access add-on content script in Firefox console?

– wOxxOm
Nov 22 '18 at 8:51







See workarounds in How to access add-on content script in Firefox console?

– wOxxOm
Nov 22 '18 at 8:51















Thanks for the link, but it doesn't helpful in my case. I want to execute a function in the extension's javascript context to trace current state. It seems impossible to do with Firefox dev tools. The only workaraound I see is to add a listener in the content to execute the required function and trigger the execution from the background scripts.

– Eugene Karataev
Nov 22 '18 at 9:29







Thanks for the link, but it doesn't helpful in my case. I want to execute a function in the extension's javascript context to trace current state. It seems impossible to do with Firefox dev tools. The only workaraound I see is to add a listener in the content to execute the required function and trigger the execution from the background scripts.

– Eugene Karataev
Nov 22 '18 at 9:29















You should clarify in your question that you refer to extension development and not to website development.

– Sebastian Zartner
Nov 23 '18 at 7:41





You should clarify in your question that you refer to extension development and not to website development.

– Sebastian Zartner
Nov 23 '18 at 7:41












1 Answer
1






active

oldest

votes


















1














The Firefox DevTools have the same feature, but you 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



Once it's enabled, 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.



(Note: The last screenshot shows Firefox 64.0, where the icon of the button and the layout of the menu changed.)






share|improve this answer
























  • Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

    – Eugene Karataev
    Nov 23 '18 at 5:22











  • I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

    – Sebastian Zartner
    Nov 23 '18 at 7:39











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426995%2ffirefox-dev-tools-change-js-execution-context%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














The Firefox DevTools have the same feature, but you 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



Once it's enabled, 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.



(Note: The last screenshot shows Firefox 64.0, where the icon of the button and the layout of the menu changed.)






share|improve this answer
























  • Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

    – Eugene Karataev
    Nov 23 '18 at 5:22











  • I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

    – Sebastian Zartner
    Nov 23 '18 at 7:39
















1














The Firefox DevTools have the same feature, but you 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



Once it's enabled, 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.



(Note: The last screenshot shows Firefox 64.0, where the icon of the button and the layout of the menu changed.)






share|improve this answer
























  • Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

    – Eugene Karataev
    Nov 23 '18 at 5:22











  • I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

    – Sebastian Zartner
    Nov 23 '18 at 7:39














1












1








1







The Firefox DevTools have the same feature, but you 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



Once it's enabled, 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.



(Note: The last screenshot shows Firefox 64.0, where the icon of the button and the layout of the menu changed.)






share|improve this answer













The Firefox DevTools have the same feature, but you 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



Once it's enabled, 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.



(Note: The last screenshot shows Firefox 64.0, where the icon of the button and the layout of the menu changed.)







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '18 at 12:55









Sebastian ZartnerSebastian Zartner

13k761103




13k761103













  • Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

    – Eugene Karataev
    Nov 23 '18 at 5:22











  • I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

    – Sebastian Zartner
    Nov 23 '18 at 7:39



















  • Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

    – Eugene Karataev
    Nov 23 '18 at 5:22











  • I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

    – Sebastian Zartner
    Nov 23 '18 at 7:39

















Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

– Eugene Karataev
Nov 23 '18 at 5:22





Thanks, Sebastian, for your detailed reply. If I get it correct, I can change js context for iFrames only. Is it possible to change js context for an add-on currently running in the browser?

– Eugene Karataev
Nov 23 '18 at 5:22













I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

– Sebastian Zartner
Nov 23 '18 at 7:39





I'm not much into Firefox add-on development these days, but if it doesn't work within the normal DevTools, it will probably work in the Browser Toolbox. That window looks basically the same as the normal DevTools but allows you to inspect everything within the browser context.

– Sebastian Zartner
Nov 23 '18 at 7:39




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426995%2ffirefox-dev-tools-change-js-execution-context%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()