google-chrome-devtools

What does (idle) mean in Google Chrome DevTools Profiler?

穿精又带淫゛_ 提交于 2019-12-06 16:34:52
问题 Probably it's obvious but I can't find an answer.. What's the exact meaning of idle in this case? Is there really nothing going on? Or just no JavaScript getting parsed/executed? 回答1: The meaning of "idle" is really obvious: "(idle)" means the time spent on doing nothing . Go to about:blank , and get a new CPU profile. The result is probably a value for (idle) close to 100% and a bit of (program) next question: Chrome debugger - What is "(program)" in the profiler? . 来源: https://stackoverflow

Is it possible to message the dev-tools panel from within inspectedWindow.eval?

旧城冷巷雨未停 提交于 2019-12-06 15:34:03
问题 I have been reading over the chrome extension message passing documentation, but I cannot seem to establish communication from within the inspected window. For example, chrome.devtools.inspectedWindow.eval('function() { . . . /* send message to dev-tools panel */ chrome.runtime.sendMessage({foo:"foo"});<-- Uncaught Error: Invalid arguments to connect. Why is the extensionId required within chrome.devtools.inspectedWindow.eval? This made me step back and ask the question. }') I have tried

Prevent manually set cookie from clearing in Chrome Devtools

江枫思渺然 提交于 2019-12-06 15:19:59
Chrome Version 73.0.3683.75 I noticed recently that whenever I manually set a cookie in Chrome and I either navigate away or refresh the page, then the value I assigned to the cookie is cleared and no longer persists. For some reason, adding a new cookie manually automatically assigns N/A to its Expires / Max Age property, which didn't happen before. The cookie value would at least persist during the browser session. I also see on the application panel that the row in which I add a cookie is highlighted red, but I have no indication as what is causing this. Any help is appreciated. Try filling

Cannot use Chrome Live Edit with Webpack source maps

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 14:30:20
I have a webpack 4 configuration that generates source maps for my app's JavaScript. While debugging my app in Chrome, the source maps get loaded so I can see my unimified code. I'll set a breakpoint in a function and in the Sources tab I'll make edits to the code. I hit CMD+S to save my edits. Normally, I would expect Chrome to think for a little bit while it processes my edits and then I can continue debugging my session with my code changes. But that doesn't happen. I get a little yellow icon next to my file in the Sources tab that says "Changes to this file were not saved to the filesystem

Chrome extensions with jQuery

亡梦爱人 提交于 2019-12-06 13:15:43
I downloaded http://code.google.com/chrome/extensions/samples.html#ea2894c41cb8e80a4433a3e6c5772dadce9be90d . I would like make it it jQuery, but if i do: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script> <script> $("div").css('background-color', 'black'); $('.click').click(function(){ chrome.tabs.executeScript(null, {code:"document.body.style.backgroundColor='" + $(this).attr('id') + "'"}); window.close(); }) </script> <div class="click" id="red">red</div> <div class="click" id="blue">blue</div> <div class="click" id="green">green</div> <div class="click" id

JavaScript can not call content script JS function

微笑、不失礼 提交于 2019-12-06 12:45:49
问题 I am developing chrome extension. I loaded JavaScript file successfully but the problem is external JavaScript (which I have loaded) can not call the function of content script files my code is as follows. $(document).ready(function() { $('.main_list').click(function() { $('.sub_list') .hide(); $(this) .parent() .children('.sub_list') .slideToggle("normal"); }); $('#click') .click(function() { $('.sub_list') .hide(); $(this) .parent() .parent() .children('.sub_list').slideToggle("normal"); })

Finding JavaScript function in the global scope

这一生的挚爱 提交于 2019-12-06 12:14:28
问题 Is there a way to search for a JavaScript attribute (e.g. a named function) in the currently live object model (what Firebug displays on the 'DOM' tab, I couldn't find a direct equivalent in the Chrome Developer Tools) of the currently loaded page, using the common developer tools of the main browsers? An example would be that I search for 'beta' and the developer tools show me something like window.alpha.beta , meaning that some script file has created an object named 'alpha' on the window

How Self & Total time is calculated having Google Chrome's devtools profile report (cpuprofile file)

孤街浪徒 提交于 2019-12-06 09:44:04
I'm writing tool to parse and extract some data from cpuprofile file (file produced when I save profile report) and I'm having some troubles with precision of Self & Total times calculations. So, time depends on the value from field hitCount , but. When hitCount is small (<300) the coefficient between hitCount and Self time ~1.033. But as hitCount grows, coefficient also grows. So, when hitCount=3585, k is 1.057. When hitCount=7265: k=1.066. Currently I'm using 1.035 as coefficient, I tried to minimize error on my sample data. But I'm not happy with approximation. I'm not familiar with

Google Chrome DevTools Extension - Detect Page Change

女生的网名这么多〃 提交于 2019-12-06 09:00:32
I am trying to detect when the webpage has changed from a Google Chrome DevTools Extension. I currently have a devtools.html & devtools.js that detects if a condition is true and if it is, it adds the dev tool panel. chrome.devtools.inspectedWindow.eval(/*my test*/, function (result, exception) { if ( exception === undefined && result === true ) { chrome.devtools.panels.create("My Panel", "", "panel.html", function (panel) { ... The problem is, if I open up the dev tool, and then navigate to another page, it doesn't re-evaluate the condition and add the panel. I have to close and reopen the

When does “Start profiling and reload page” decide to stop the automatic recording?

风流意气都作罢 提交于 2019-12-06 07:50:03
问题 I use the Performance Timeline in Chrome DevTools quite a lot to capture performance recordings of my page. Most of the time I use the "Start profiling and reload page", which automatically starts and stops the recording. The question is: When does DevTools decide to stop the recording ? I've noticed that it always continues to record at least a few hundred ms past the "Load"-event and tries to figure out when the page has gone "mostly idle". But that's quite a fuzzy guess. I'd love to know