google-chrome-devtools

Programmatically get memory usage in Chrome

匆匆过客 提交于 2019-11-27 01:17:52
问题 How can I programmatically get memory usage (JS and total) of my website in Google Chrome? I looked at doing it from a Chrome extension using the undocumented HeapProfiler (see here), but I can't find a way to get data from that. I want to measure the memory consumption it at every release, so this needs to be programmatic. EDIT: I figured out how to get the HeapProfiler method to work. Each addHeapSnapshotChunk event has a chunk of a JSON object. chrome.browserAction.onClicked.addListener

how to set DOM Breakpoints in chrome

假装没事ソ 提交于 2019-11-27 00:54:02
I'm trying to follow the tutorial here . I'm stuck on the section DOM Breakpoints (near the bottom). I went to the example site they are talking about. I pressed ctrl + shift + i and navigated to "elements" tab. In the elements tab I found the following html section: <div id="profileCard" style="position: absolute; left: 403px; top: 135px; visibility: hidden; display: none; " class="goog-hovercard"> </div> Now I'm stuck trying to find the context menu: Bring up a context menu on the #profileCard element and select the events you want to break on: subtree modifications, attributes modifications

Chrome: Source of Post Data?

瘦欲@ 提交于 2019-11-27 00:34:50
I am using Chrome 15 with Developer Tools to investigate HTTP POST requests. After sending a request, in the Network tab under Headers there is a section called Form Data . This section contains the post data nicely formatted. However: How do I get the source of the post data, i.e. the body of the request? Currently, I use Firefox with Firebug to get that data, or I reconstruct the source from the formatted Form Data. Cumbersome... Chrome 29–56, and possibly beyond Finally (maybe already with version 28), it's simple. Just click on view source next to Form Data : Also, at least in version 56,

How to debug angular app using angular-cli webpack?

帅比萌擦擦* 提交于 2019-11-27 00:19:31
I used angular-cli@1.0.0-beta.10 before and now I updated to angular-cli@webpack beta.11. After a lot of custom changes I got it to work. The only thing is that now I can not debug my angular app using webstorm and chrome debugger because I don't get any ts files using ng serve. With angular-cli@1.0.0-beta.10 it was very easy to debug my app using the Jetbrains Plugin. How can I debug my angular app with Webstorm and the Chrome Debugger using ng serve? How to debug with angular/cli The new angular/cli version uses webpack which does not compile the ts files to an local directory like dist

Chrome Devpanel Extension Communicating with Background Page

老子叫甜甜 提交于 2019-11-27 00:11:50
问题 I have an extension to the chrome devtools panel. I can send messages to the page using chrome.devtools.inspectedWindow.eval ... but how do I receive messages in the dev panel? Specifically, I need my devpanel to hook into events that happen on the page. I can't get it to listen to events on my content script, nor the background page. I've tried chrome.extension.sendMessage in the content script, along with chrome.extension.onMessage.addListener in the dev panel script. But sendMessage

Javascript Debugging line by line using Google Chrome

本秂侑毒 提交于 2019-11-26 23:59:40
How can I step through my javascript code line by line using Google Chromes developer tools without it going into javascript libraries? For example, I am heavily using jQuery on my site, and I just want to debug the jQuery I have written, and not the javascript/jquery within the jquery libraries. How do I only step through my own jquery/javascript and not have to step through the millions of lines in the jquery libraries? So if I have the following: function getTabFrame() { $.ajax({ url: 'get_tab_frame.aspx?rand=' + Math.random(), type: 'GET', dataType: 'json', error: function(xhr, status,

Finding JS memory leak in chrome dev tools

让人想犯罪 __ 提交于 2019-11-26 23:58:18
问题 I’m using the chrome dev tools to work out if there is a memory leak in some JS code. The memory timeline looks good with memory being reclaimed as expected. However, the memory snapshot is confusing because it appears like there is a leak because there are entries under “Detached DOM Tree”. Is the stuff under “Detached DOM Tree” just waiting to be garbage collected or are these real leaks? Also does anyone know how to find out what function is holding on to a reference to a detached element?

Suggestions for debugging print stylesheets?

谁说胖子不能爱 提交于 2019-11-26 23:23:19
I've recently been working on a print stylesheet for a website, and I realized that I was at a loss for effective ways to tweak it. It's one thing to have a reload cycle for working on the on-screen layout: change code command-tab reload but that whole process gets much more arduous when you're trying to print: change code command-tab reload print squint at print-preview image open PDF in Preview for further inspection Are there tools I'm missing out on here? Does WebKit's inspector have a "pretend this is paged media" checkbox? Is there some magic that Firebug ( shudder ) can do? Rafael

Why will jQuery not load in Facebook?

你。 提交于 2019-11-26 22:52:39
Situation : I am writing a chrome extension that works on any page. Problem Question : I can not load jQuery into Facebook and I would like to understand what is happening. Hypotheses : Facebook possess some ultra advanced tech that somehow detects both : When jQuery is loaded via a chrome extension in an ostensibly separate JSVM execution context, the Facebook megamind somehow knows about this ostensibly separate JSVM execution context, and blocks it. that jQuery is loaded via script.src and blocks it (when I used the Google CDN which serves over HTTPS instead of the jQuery one which doesn't

How to use Postman Interceptor

拥有回忆 提交于 2019-11-26 22:44:40
问题 Ever since I upgraded to Postman 0.9.6 I can't replicate user sessions because chrome doesn't allow postman to get user cookies. However, they have decided to "work around" this issue by created another plugin called Postman Interceptor that routes your postman request and grabs the user cookies. They wrote a blog post about this wonderful tool here: http://blog.getpostman.com/index.php/2014/02/11/postman-v0-9-6-access-cookies-and-restricted-headers-plus-better-testing/ However, I can't seem