google-chrome-devtools

Google Chrome dev tools automatically opens the 'drawer' pane

旧时模样 提交于 2019-12-03 22:46:22
As of a few days ago, whenever I open the developer tools in Chrome on OSX the 'drawer' automatically opens - 2nd screen shot The icon in blue shows/hides the drawer (now defaults to on) - First screen shot This is so annoying and I cant figure out a way to stop this behaviour. It never did this before.... This was annoying me to no end and I could never figure out why it was automatically opening. Apparently the fix, at least in my case, is that I went into the Emulation tab inside of the drawer and disabled any of the overrides. Everything in blue is highlighted as an override. Disabling

How to extract network tab contents of Chrome Developer tools via json

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 22:42:31
问题 I am trying to extract the network calls of chrome developer tools via selenium webdriver using json, Is there is any other json format available to extract the network size or content-length? 回答1: You can use the LoggingPreferences to get the Performance logs. It returns the data in json format. Here is a sample java code. Tested this with selenium 2.53, chromedriver 2.20, Chrome 50 on Ubuntu 14.04. This should work on windows also. DesiredCapabilities d = DesiredCapabilities.chrome();

How to hide Chrome “paused in debugger” overlay?

拟墨画扇 提交于 2019-12-03 22:16:29
Some semi-recent update to Chrome now places an overlay on my webpage when paused at a breakpoint. I'm specifically trying to view the state of my page markup at this point, and the overlay is hiding exactly what I want to see! Is there a way to turn off this markup? Or is there a way to revert Chrome to a version that doesn't have this mis-feature? István Ujj-Mészáros Now there is an option in Inspector's settings, just uncheck Disable paused state overlay . It is very usable with the setTimeout(function(){debugger;}, 5000); trick to inspect elements that are visible only on hover. I've run

Use the Tampermonkey API from the Chrome console?

一个人想着一个人 提交于 2019-12-03 21:47:34
问题 Is there any way use Tampermonkey's API in Chrome's JavaScript console? I want to mess with functions like GM_xmlhttpRequest() and GM_listValues() . 回答1: Create the following script: // ==UserScript== // @name Exports some GM functions // @namespace Whatever // @match * // ==/UserScript== // WARNING: Any page can now use these methods! Be careful, // or change "@match *" to "@match https://example.com" and // visit https://example.com to test the API. unsafeWindow.GM_xmlhttpRequest = GM

Best way to detect when a function is called from the console

删除回忆录丶 提交于 2019-12-03 20:41:48
I would like to know the best way to detect when a method or function is directly called through the console. As far as I currently understand, it's not possible to directly detect it on identical function calls, but using the .call() and .apply() methods of a function I can pass additional data through the this object. Given the following code structure: (function(){ var Player = {money: 0}; window.giveMoney = function(amount){ if (this.legit !== true) throw new Error("Don't try to cheat!"); Player.money += amount; } })(); I could call the function using window.giveMoney.call({legit: true},

Why is chrome.devtools.network “undefined”?

强颜欢笑 提交于 2019-12-03 17:06:47
问题 I'm trying to create an extension that logs all network events. This is the code: Manifest.json: { "name": "My extension", "version" : "1.0", "background": { "scripts": ["background.js"], "persistent": true }, "devtools_page": "devtools.html", "browser_action": { "default_title": "Get it", "default_icon" : "icon.png" }, "manifest_version": 2 } background.js: chrome.devtools.network.onRequestFinished.addListener(function(request) {}); What's the problem? I tried a lot of things, it doesn't

Where has the Google Chrome Console Filter [_] Regex checkbox gone?

旧城冷巷雨未停 提交于 2019-12-03 16:23:19
问题 All of the Google Chrome Console documentation pages (and numerous SO answers) show a checkbox labeled "Regex" next to the filter when the filter bar is expanded, e.g., from the Command Line API Reference: I use it so much that I have macros set up to paste various Regexes into it, so I'm positive I am not crazy and that it existed until very recently. I am using Google Chrome Version 57.0.2987.21 beta (64-bit) on Mac OS X, and it's no longer there: Is it gone, have I done something

Idea: Conditional Chrome theme based on environment [closed]

我只是一个虾纸丫 提交于 2019-12-03 16:12:56
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . As a web developer I'm constantly working on projects in different environments (local, staging, testing, production). I mostly work on Drupal projects. I can't tell you the number of times I've been led from local to production by just browsing the site. And then accidentally

Double dollar $$() vs Dollar sign $() in Chrome console behavior

有些话、适合烂在心里 提交于 2019-12-03 16:10:59
In our project, there is a different functionality when one Dollar sign used $() in Chrome console vs two Dollar signs $$(), besides the known difference that $$() return an array an $() return the first element. For example, selector for specific element, with one dollar and two dollar queries: $$(".my-class[my-attribute='trump']") //works $('.my-class[my-attribute=sanders]') //works $$('.my-class[my-attribute=trump]') //not work What is the source and explanation for this behavior? Denys Séguret From Chrome Developer Tools documentation : Selecting Elements There are a few shortcuts for

Emulate iPhone X on Chrome

╄→гoц情女王★ 提交于 2019-12-03 16:05:56
I need to emulate an iPhone X on Chrome. I have found the info below: Height: 5.65 inches (143.6 mm) Width: 2.79 inches (70.9 mm) Can you tell me which values should I give to the form below? iPhone X sepecifications This is what Device pixel ratio (DPR) is If you want to emulate a Retina device from a non-Retina machine or vice versa, adjust the Device pixel ratio. The device pixel ratio (DPR) is the ratio between logical pixels and physical pixels. Devices with Retina displays, such as the Nexus 6P, have higher pixel density than standard devices, which can affect the sharpness and size of