google-chrome-devtools

How to load saved .cpuprofile file in Chrome developer tools CPU profile?

冷暖自知 提交于 2020-01-03 15:26:05
问题 There's a save button in the Chrome dev tools profiler, but no load button. How do you load a saved profile back into Chrome to view it? 回答1: There is a "Load" button just under the list of profiles. 来源: https://stackoverflow.com/questions/30774548/how-to-load-saved-cpuprofile-file-in-chrome-developer-tools-cpu-profile

How to run asynchronous code in chrome devtools when script execution is paused?

☆樱花仙子☆ 提交于 2020-01-03 11:13:20
问题 await Promise.resolve(1) in chrome devtools (chrome version 70.0.3538.77) resolves to: 1 when script execution is not paused Promise <pending> when script execution is paused How to resolve it to 1 when script execution is paused N.B. this question continues chrome debugger promises dont resolve while paused? to find the exact way to resolve promises when chrome is paused 来源: https://stackoverflow.com/questions/53852917/how-to-run-asynchronous-code-in-chrome-devtools-when-script-execution-is

Bug on hover in chrome debugger? (v79.0.3945.79)

假如想象 提交于 2020-01-03 08:31:41
问题 I'm debugging a React Native 0.61.5 app with Chrome and usually when code stop running on a breakpoint and I hover a property, I can see all the details of it in a popup window. But for two days now I can't get back this functionality. I restarted computer, cleaned Chrome and Metro bundler, tried with virtual or real device but it's still not working. Did I deactivated something accidentally ? 回答1: Yes, with Chrome 79 this functionality was broken. This is the thread where people are

Chrome Inspect Device not showing android app

眉间皱痕 提交于 2020-01-03 04:15:11
问题 I am trying to debug this app using chrome://inspect - Devices, but I am not able to see my app in the debug app list. I can see the device name and only Chrome app under it, but not my app. Settings that I have applied Enable USB Debugging (Android Device) Discover USD Devices (Chrome Dev Tools) Select Debug app - App Name Use USB for - File Transfer Added android:debuggable="true" in Manifest file I have also tried using different USB cables, different android device, but no luck. 回答1:

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

寵の児 提交于 2020-01-02 05:29:09
问题 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). 回答1: 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

Chrome Dev Tools: Tells me what type of event is attached to element but which file?

巧了我就是萌 提交于 2020-01-02 04:51:12
问题 In Chrome when I right click on a DOM element to see which event listeners are attached it always says jquery.min.js:2 . However, I would like to know which of my JavaScript files contains that listener (e.g. click event listener). For example, which file has this code in it? $('#clickMe').on('click', function(e){ //clicked}); 回答1: Chrome has no way of knowing that. When you write $(...).click(function) , the event handler that gets added to the function is always within jQuery. Chrome cannot

Google Chrome DevTools elements search not working anymore?

放肆的年华 提交于 2020-01-02 03:29:11
问题 Since about a week ago, I haven't been able to search for elements or the contents of an element in Google Chrome DevTools. Did the latest Chrome update break this functionality or has something else changed that I should be aware of? I first thought I had accidentally changed some of the DevTools settings, but now the same thing started happening on my other dev machine as well, so I think it must be a bug in the latest update? Is it just me? :) EDIT: After a few days of wondering what could

Why is the width of a website the same even when I change the viewport in Chrome Debug Tools?

江枫思渺然 提交于 2020-01-02 02:38:09
问题 I'm using the Viewport emulator of Chrome Debug Tools. What I find strange is that regardless of the viewport width Chrome always reports the same width in pixels and neither zoom nor the DeviceToPixelRation (DPR) change. Styles for h1 set width to 100% and there's no other code. I'd expect that either the width or DPR will change when the viewport width changes. Why doesn't it happen? Here is the code: <head> <meta charset="UTF-8"> <title>Title</title> <style> * { margin: 0; padding: 0; } h1

Why is chrome highlighting a margin that is not listed in styles or computed

♀尐吖头ヾ 提交于 2020-01-02 02:00:10
问题 There are no margin styles being shown under "styles", and as you can see it doesn't show any being computed either. No idea what's going on here but I noticed this right after changing the width of the element to 90%. I'm using foundation so maybe its some competing styles? I'm not asking how to fix my specific issue which is why I've posted no code. I'm just confused why chrome would highlight a margin when its not showing any to be computed 回答1: This is caused by the display: block rule.

Chrome Extension: webRequest Redirect to Existing Tab, Without Opening New Tab

假如想象 提交于 2020-01-01 19:07:15
问题 When a user opens a certain page, I want to open that page in an existing tab, before a new tab is opened. I've tried with webRequest: chrome.webRequest.onBeforeRequest.addListener( function(details) { chrome.tabs.query({ url: 'https://example.com/' },function (tabs) { chrome.tabs.update(tabs[0].id, { url: details.url, highlighted: true }); }) }, {urls: ['https://example.com/']}, ['blocking'] ); I've also tried with webNavigation: chrome.webNavigation.onBeforeNavigate.addListener(function