Firefox dev tools: change JS execution context
Chrome dev tools allow to change javascript execution context.
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
add a comment |
Chrome dev tools allow to change javascript execution context.
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
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
add a comment |
Chrome dev tools allow to change javascript execution context.
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
Chrome dev tools allow to change javascript execution context.
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
google-chrome-devtools firefox-developer-tools
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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:
Once it's enabled, there is a new button at the upper right corner of the DevTools window:
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:
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.)
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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:
Once it's enabled, there is a new button at the upper right corner of the DevTools window:
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:
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.)
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
add a comment |
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:
Once it's enabled, there is a new button at the upper right corner of the DevTools window:
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:
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.)
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
add a comment |
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:
Once it's enabled, there is a new button at the upper right corner of the DevTools window:
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:
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.)
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:
Once it's enabled, there is a new button at the upper right corner of the DevTools window:
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:
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.)
answered Nov 22 '18 at 12:55
Sebastian ZartnerSebastian Zartner
13.1k76099
13.1k76099
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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