Problem Description
I am trying to get chromium renderer process id of chrome relative to specific tab(page, frame) using Devtools Protocol. I know there has chrome api[1] chrome.processes for doing such things(eg. chrome.processes.getProcessIdForTab). However, I wonder if any equivalent api in Devtools Protocol[2] doing the things too. I can't find explicit solution in Devtools document[2].
Thanks for your help.
Reference
[1] “chrome.processes,” Chrome Developers. [Online]. Available: https://developer.chrome.com/docs/extensions/reference/processes. [Accessed: 14-Jun-2021].
[2] "Chrome DevTools Protocol," Chrome Developers. [Online]. Available: https://chromedevtools.github.io/devtools-protocol/. [Accessed: 14-Jun-2021]
Related
I'm trying to identify API calls that a chrome extension is doing, but I am not seeing those in the network tab of Chrome (inspect->network).
Is there a way to mask those out from there? Should I use a different tool to identify the network activity?
I guess you must be using DevTools for Chrome to debug you extension. In that case you can't see the network activities of your extension.
In order to debug you extension, you should use the DevTools for Extension:
Right click the extension icon, and you will see Inspect the popup, click that and select Network tab and you are done.
Like this(pay attention to the title of this):
For more infomation, you can see Debugging of the chrome-extension tutorial. Hope this helps.
I'm trying to use the Chrome Experimental Devtools API.
I've tried running Chrome with: --enable-experimental-extension-apis as suggested here: http://developer.chrome.com/extensions/experimental.html and enabled the "Experimental Extension APIs" in the flags settings.
When I open the Console in Chrome (or Canary), I get the following:
chrome.devtools: undefined
chrome.experimental: undefined
I'm running Chrome 21.0.1180.77 beta-m. I've also tried Canary.
What am I missing?
As explained here: http://developer.chrome.com/extensions/devtools.html, the chrome.devtools APIs are only available in your devtools HTML page.
First, you need to create an HTML file and then add it to your extension's manifest under the "devtools_page" key. When you load your extension into Chrome and open the DevTools, you should see your new tab.
In that tab is the only place chrome.devtools will work.
chrome.experimental is different and will be available in all of your background pages and content scripts.
You need to run it only in Canary.
Plus when you run chrome add this flag to the command line:
path_to_chrome.exe --enable-experimental-extension-apis
One of the best features about Firefox and Firebug is that you can see exactly what your AJAX calls responses are.
Safari and Chrome have Developer Tools, but the Console is lacking. It doesn't show anything except for warnings and errors.
Am I missing something? Without having to place a breakpoint is the script, is it possible to see the response within Safari or Chrome's Developer Tools?
To elaborate:
"Network" doesn't show you what the actual response is that I can see. It just shows all of the loaded resources.
If I make an AJAX call to a web service, I want to be able to see the JSON response.
You can use the Network tab.
I'm using the developer window in google chrome, and it gives a lot of useful information. However, I have several resources (3 or 4 images) which are receiving 404 errors. These resources are unnecessary, so I need to find out why the browser is requesting them (what css/javascript/inline html is directing the request, so that I can remove that line of code. Is there a good way to find out why it was requested?
Go to Tools -> Developer Tools -> Network Tab
I would recommend you use Firebug addon in Firefox. I haven't found any equivalent for Chrome extension. Firebug has "NET" tab you can see all the requests made to the server.
In Firebug, you can
see JSON formatted as an expandable tree of items
and also explore them using Firebug's Dom tab.
The view is available within Net panel and visible as
soon as a JSON request is expanded.
As in this screenshot:
I'm trying to switch to Chrome but can't find this feature in Dev Tools.
Does Chrome's Dev Tools provide something similar (assuming you're not using any additional extensions like Firebug Lite)?
You can use:
inspect(myObject);
in the Chrome console to get an inline object inspector similar to what the DOM tab in Firebug gives you. In your case you can to do this on whatever object you assign your JSON results to.
As far as I know Chrome does not have this feature.
In case you didn't know, Firebug Lite for Chrome supports this feature (only for XHR requests), so you can use both Chrome Dev Tools and Firebug Lite to inspect JSON responses. See this blog post:
http://blog.getfirebug.com/2010/09/09/firebug-lite-1-3-1/
Disclaimer: I work with the Firebug Working Group
Chrome 12 (12.0.742.6) will have this feature!
You can already download the beta of 12 today.
https://bugs.webkit.org/show_bug.cgi?id=20628#c4