google-chrome-devtools

Split the “Elements” tab and the “Console” in Chrome dev Tools

北慕城南 提交于 2019-12-05 19:13:59
问题 Is there a way to have a view of both the Elements and the Console in two different windows or with the windows split in two part? 回答1: The Drawer offers the functionality you want. When on the elements panel, just press esc (when DevTools has focus) to open the drawer which contains a console. 来源: https://stackoverflow.com/questions/32371268/split-the-elements-tab-and-the-console-in-chrome-dev-tools

Chrome Debugging Protocol: HeapProfiler.getHeapSnapshot Ignores Callback

≡放荡痞女 提交于 2019-12-05 18:51:27
I'm working on a testing suite (implemented as a Chrome extension) that programmatically takes and analyzes heap snapshots with Chrome/Chromium's remote debugging protocol. Because Profiler.* doesn't seem to be part of the public protocol, I'm using this page for reference. Right now, I'm able to take a heap snapshot by calling HeapProfiler.takeHeapSnapshot like in the snippet below. However, when I try calling HeapProfiler.getHeapSnapshot , my callback is completely ignored. var debuggerId = {tabId: sender.tab.id}; chrome.debugger.attach(debuggerId, "1.0", function() { var listener = function

Unable to Live Edit Javascript in Chrome Developer Tools

好久不见. 提交于 2019-12-05 17:49:21
问题 I have done this a million times, i.e open the javascript file in the "Sources" tab, edit and hit CTRL+S to save it, upon which Chrome would confirm the same with a "Recompilation and Update Succeeded". But I can no longer do this! There is no confirmation message in the console. Also, the source window turns reddish indicating failure to do so. The same script is getting edited from a different system. I am on Chrome 41.0.2272.101m / WIN8. The script is not "prettified", just to rule that

Google chrome extension : is it possible to get console output (js errors, console.log or etc)

走远了吗. 提交于 2019-12-05 17:12:22
问题 I am developing chrome extension, and the thing that i really need is to get console output as object. Is it possible to get any of that in chrome extension popup.html/popup.js or somewhere ? I have tab object, can i get somehow that particular tabs console, or error output from the inspector/devtool in chrome console as object in code? 回答1: Google Chrome Console has no possibility (upon now) to get the Output/Contents of the Console. 回答2: In your popup.js file you can just use console.log(

Puppeteer: How to get the contents of each element of a nodelist?

China☆狼群 提交于 2019-12-05 16:38:28
I'm trying to achieve something very trivial: Get a list of elements, and then do something with the innerText of each element. const tweets = await page.$$('.tweet'); From what I can tell, this returns a nodelist, just like the document.querySelectorAll() method in the browser. How do I just loop over it and get what I need? I tried various stuff, like: [...tweets].forEach(tweet => { console.log(tweet.innerText) }); page.$$(): You can use a combination of elementHandle.getProperty() and jsHandle.jsonValue() to obtain the innerText from an ElementHandle obtained with page.$$() : const tweets =

Inexplicit 'task' in Chrome Perfomance DevTools

允我心安 提交于 2019-12-05 15:46:39
问题 Chrome exhibits huge lags when viewing a given web page of mine. I'm using the DevTools Performance tab to try and find the culprit which I assume to be somewhere in my JavaScript code. The following screenshot shows a profile recorded using DevTools. For some of the "tasks" shown in the profile, I can see the details of what the tasks are doing (for example, the one between 8700 ms and 9200 ms is GC), but for other tasks there are no details whatsoever, like the two I have highlighted in the

Disable Chrome developer tools ⌘-[0-9] keyboard shortcuts?

China☆狼群 提交于 2019-12-05 14:48:53
Is it possible to disable the ⌘-[0-9] keyboard shortcuts in Chrome's developer tools? It's frustrating to accidentally hit them when I intend to switch tabs (ex, when I hit ⌘-1 because I want to switch to the first tab, but instead being taken to the developer tools "Elements" panel). Update: This feature has landed in Chrome 28 . Open the devtools. Click on the Gears icon in the bottom-right corner Select the General tab Use the checkbox before "Enable Ctrl + 1-9 shortcut to switch panels" to toggle the preference. This option is found in the bottom-right corner of the Settings -> General tab

Is it possible to automatically open Google Chrome devtools?

大城市里の小女人 提交于 2019-12-05 14:45:37
问题 Given that Selenium 2 closes the devtools window which contains my emulator profile saved under my user profile for chrome. Is there a way to trigger devtools to open using a selenium script? Here is the info on the devtools window closing issue https://sites.google.com/a/chromium.org/chromedriver/help/devtools-window-keeps-closing I feel a little exhausted trying some of these Chromium override parameters only one of which seems to work http://peter.sh/experiments/chromium-command-line

Is there an alternative to preprocessorScript for Chrome DevTools extensions?

那年仲夏 提交于 2019-12-05 14:02:30
I want to create a custom profiler for Javascript as a Chrome DevTools Extension. To do so, I'd have to instrument all Javascript code of a website (parse to AST, inject hooks, generate new source). This should've been easily possible using chrome.devtools.inspectedWindow.reload() and its parameter preprocessorScript described here: https://developer.chrome.com/extensions/devtools_inspectedWindow . Unfortunately, this feature has been removed ( https://bugs.chromium.org/p/chromium/issues/detail?id=438626 ) because nobody was using it. Do you know of any other way I could achieve the same thing

Chrome Developer Tools caches old version of JavaScript files

纵饮孤独 提交于 2019-12-05 13:16:30
问题 I'm experiencing a strange intermittent issue with Chrome Developer tools hanging on to old versions of JavaScript files. I'll be developing some JS app, things humming along just find, and then all the sudden my JavaScript files will disappear from the list of JavaScript files on the "sources" tab. This is my first clue that something is wrong. What I eventually discovered is that Chrome Developer Tools is, apparently hanging on to an old version of the JavaScript file. Chrome itself is