google-chrome-devtools

How to search DOM elements using XPath or CSS selectors in Chrome Developer Tools?

妖精的绣舞 提交于 2019-12-03 00:14:14
问题 The doc http://code.google.com/chrome/devtools/docs/elements.html says it supports XPath or CSS selectors, but when I tried, didn't seem to work for me. Any one knows how to use it? 回答1: You can use $x in the Chrome javascript console. No extensions needed. ex: $x("//img") 回答2: Just typing xpath expression in the search box should work. It works for me in tip-of-tree build. The feature seems to be broken in Chrome 11 though, I've filed a bug on this: http://crbug.com/79716 回答3: For xpath

Chrome Workspaces - Saves changes in Sources tab but not Elements

别说谁变了你拦得住时间么 提交于 2019-12-03 00:13:48
I'm trying to setup and use Workspaces on Canary and I'm running into a few issues. I understand that is still under development but could someone clarify these issues i'm having aren't or are related to the fact that its still under development? Basically I setup a workspace in DevTools, locating the directory on my file system. Do I need to put anything in URL prefix and folder path input boxes? I've experimented leaving them blank, filling them in etc, but due to the lack of documentation I'm not sure what the correct input is. Most of the time I run my sites through MAMP so will custom

Inspect element that only appear when other element is mouse overed/entered

守給你的承諾、 提交于 2019-12-03 00:02:07
问题 Often I want to inspect an element (e.g. tooltip) that only appears when another element is mouse overed/entered. The element that appears, is made visible via jQuery's mouseenter event. I can't inspect the tooltip, since the tooltip disappears when my mouse leaves the containing element. Is there a way to pause JS events so I could hover on the element, then pause the browser's JS, and successfully inspect it? For an example, try inspecting Twitter bootstrap's tooltips: http://getbootstrap

How to link to chrome extension like Chrome Web Store?

冷暖自知 提交于 2019-12-02 23:23:57
I'd like to self host a chrome extension on my own site but would like the install experience to be the same as on the chrome web store. Specifically, I'd like to have a "add to chrome" button which asks the user to install the extension with one more click. Currently on self hosted extensions you have to confirm the download and then confirm the install. Here's an example of the web store: https://chrome.google.com/webstore/detail/olnconaknblgbkfgknkfmmfhhbebkekd The only reason I'd like to self host is so that they can stay on my site while installing the extension. I'd be perfectly fine

How can I override/extend ReferenceError in Chrome's JavaScript?

流过昼夜 提交于 2019-12-02 23:10:07
To make debugging easier, I'm capturing all of the console logs in Chrome so that users who submit a feedback entry will also submit all of the logs to our server. When someone encounters a problem in production, I can first and foremost get them back to work so that I can then sit down and more thoroughly go through all of the logs to determine the root cause of whatever issue the user encountered in production. The technique I use to capture the logs involves overriding console.log so that all text entered in the first argument gets stored in an array while simultaneously invoking the legacy

React.js app using up a lot of memory ( almost double the original implementation )

怎甘沉沦 提交于 2019-12-02 22:58:19
I recently ported a heavy page to React. I've kept the html almost identical. The main difference being that, earlier, the server rendered html was directly given to the browser and now, the react rewrite pulls json via a server side API and uses React to manage the DOM. I've seen heap snapshots for the earlier implementation going up to 55 MBs . For the same data, the heap snapshot for the React.js implementation comes to around 100+ MBs (almost double) I understand that the json data held in memory will contribute to some increase in the memory consumed. But, when I examined the heap

How to disable chrome extensions JS when debugging in devtools?

我只是一个虾纸丫 提交于 2019-12-02 22:25:30
When I add mouse event breakpoint, devtools always jump into extension's JS. Is there any way to point to my mouse event code directly? I think the simplest way is to open an incognito window ( Ctrl-Shift-N ) (or Cmd-Shift-N for mac) and debug in there, because then there will be no extensions loaded (by default). I know what you mean by this question: when debugging, and doing something simple like pausing execution, you always find it breaks into one of the extension's codes instead of the current webpage's code. The only way to disable the script (e.g. to avoid side-effects) is by disabling

Chrome DevTools save CSS changes directly to SASS file

给你一囗甜甜゛ 提交于 2019-12-02 22:17:12
Is it possible to have style changes done directly in the "Styles" panel not only persisted to the .css but also to the corresponding .scss file? I have CSS source maps for every file and that works fine - I can jump right into the .scss file when I Ctrl-Click a property. I can edit the .scss file then and it reloads correctly (compass task in the background), but unfortunately everything I change directly in the Styles panel is persisted only to the compiled .css file. As soon as I change a value, the file changes to main.css and the changes are only persisted there: SASS/SCSS live editing no

jQuery ajax: how to prevent 404 errors spam in chrome DevTools? [duplicate]

◇◆丶佛笑我妖孽 提交于 2019-12-02 22:01:42
This question already has answers here : Can I prevent the Chrome Developer Tools console from logging image 404 errors? [duplicate] (5 answers) Suppress Chrome 'Failed to load resource' messages in console (3 answers) I'm communicating with CouchDB via jQuery ajax, and '404' errors are expected by REST contract. But for each requests that ends with '404', '412' or so, google chrome write a red error line in DevTools console, like this: Is it possible to somehow configure jQuery so '404' is not an error for given request? Fake errors spam clutter output and i can miss real errors or some

Is it possible to view jQuery added data in Chrome

亡梦爱人 提交于 2019-12-02 21:47:35
When creating websites I often use jQuery's .data() function to add data to elements. Is it possible to view all data which is stored with an element in Chrome? So when I inspect an element it shows the data in Chrome itself. If not would it be possible to write a plugin to 'extend' to Chrome element inspector to also show to data? Open the inspector, and into the console, type $('<some selector>').data() and then hit return to evaluate the data() method and show its return value directly. There's no need to use console.log unless you're calling it within non-interactive code. Chrome Query Can