google-chrome-devtools

How can I use chrome.downloads.onDeterminingFilename to change downloaded file names if the files have extension of jpg or png?

て烟熏妆下的殇ゞ 提交于 2019-12-22 11:05:17
问题 How can I use chrome.downloads.onDeterminingFilename to change downloaded file names if the files have extension of JPG or PNG? I am looking at the example here: chrome.downloads.onDeterminingFilename.addListener(function(item, __suggest) { function suggest(filename, conflictAction) { __suggest({filename: filename, conflictAction: conflictAction, conflict_action: conflictAction}); } var rules = localStorage.rules; try { rules = JSON.parse(rules); } catch (e) { localStorage.rules = JSON

How is defined `resourceType` value provided by the DevTool protocol?

最后都变了- 提交于 2019-12-22 09:25:04
问题 While using Puppeteer or Chrome DevTools APIs, you can get a value for resourceType (on Request object in Puppeteer and on Page object in Chrome DevTools). How does this value is establish by the "rendering engine" (as called in the documentation)? Possible values being: Document , Stylesheet , Image , Media , Font , Script , TextTrack , XHR , Fetch , EventSource , WebSocket , Manifest , Other API documentation: Puppeteer API and Chrome DevTools API Similar question on stackoverflow: Is There

$.focus() not working in chrome

馋奶兔 提交于 2019-12-22 08:57:16
问题 In chrome's developer tools console I'm selecting an input[type="text"] element, then trying to focus on it eg $('input#foo').focus() . It doesn't work, no error is thrown but the element isn't focused. I spent half an hour trying to figure out the problem so am posting this in order to help others who have this 'problem' since I didn't find an answer on SO. 回答1: The reason this happens is that the main part of the page isn't allowed to take focus away from the dev tools window, so when you

What does “document count” in the devtools refer to?

爱⌒轻易说出口 提交于 2019-12-22 07:45:20
问题 You can see the word "Document Count" in Chrome DevTools. What is it? For example, recording the below website, the number of documents is 8 or 9. https://developers.google.com/chrome-developer-tools/docs/javascript-memory-profiling?hl=it#dominators This is a question of a tool but I think this could be a question of HTML, so I'm asking here. 回答1: The "Document Count" maintains a count of the number of documents used by your application over time, that are held in memory (not garbage

Chrome Developer Tools: inspect prettified CSS

旧街凉风 提交于 2019-12-22 06:23:20
问题 If you want to look at the CSS of other people's websites (to steal learn from them), Firebug lets you inspect the prettified CSS: But in Chrome 16, you only get the minified CSS as it was served out: Is there a way to get Chrome to prettify the CSS? 回答1: In the newer versions there is a "format" button that prettifies the source: (only just realised myself :P ) 回答2: The Developer's console shows the file as served. If you want a human-readable version, copy-paste the code to http://www

Error: EACCES, permission denied even after using sudo?

时光总嘲笑我的痴心妄想 提交于 2019-12-22 06:10:48
问题 I am trying to set up a chrome extension that will automatically save the changes I make to my website with the inspect element feature. The idea is that you'll be able to make real time changes to the website without having to go back into the ide to save the changes and re-upload and everything. The extension is called DevTools Autosave. I've been following the instructions from this site. I'm trying to install this on a mac. I've installed node.js and the extension already. When I got to

Chrome's --auto-open-devtools-for-tabs

浪尽此生 提交于 2019-12-22 04:55:18
问题 I'm trying to get the devtools to open automatically when starting chrome from a shortcut with a command line switch --auto-open-devtools-for-tabs . i.e. the path of that shortcut is: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito -auto-open-devtools-for-tabs (or --auto-open-devtools-for-tabs). But both don't seem to open the dev tools, neither does entering in the cmd chrome.exe -auto-open-devtools-for-tabs (or --auto-open-devtools-for-tabs), of course when in

Show only errors in Chrome development console

走远了吗. 提交于 2019-12-22 01:33:19
问题 Is there a way to display only errors on the Chrome development console? Right now it displays about a million warnings and I have to search through them to find the errors. Thanks! 回答1: In the latest version of Chrome console there is now a drop-down menu next to the Filter box, which is set to "Info" by default. This menu allows you to switch between only showing errors, warnings, info or verbose. Pictured here: 回答2: You can hold the Control button (Command on Mac) to select more than one

Measure full page size in Chrome DevTools

倾然丶 夕夏残阳落幕 提交于 2019-12-22 01:33:04
问题 I've been googling for some time but haven't found any clear solution for this. I want to measure full webpage weight / size (all doucment + scripts + fonts + styles etc.). I know the network tab in the devtools has size/content - but I want to have it summed (and not sum it every time). I've been looking for chrome.devtools.* API but haven't found anything straight-forward. Do you have some ideas how to achieve that? 回答1: In the Network tab, make sure 'Disable cache' is checked and then when

Chrome dev tools loses network history

让人想犯罪 __ 提交于 2019-12-22 01:28:11
问题 The Network tab in Google Chrome developer tools is great but seems to lose all history on certain form posts. Is there any way to get it to retain network history? If not is there another tool I could use? 回答1: The "Preserve Log upon Navigation" status bar button in the Network panel should solve the issue. 回答2: Is there any way to get it to retain network history? Yes and No.It depends what you need. You can try Preserve Log status bar button in the Network panel. It do NOT retain all the