google-chrome-devtools

Dev tools Network Tab, open script in Sources tab?

柔情痞子 提交于 2019-12-07 14:29:51
问题 In Chrome Dev Tools, when viewing the Network tab, is it possible to select a script and open it in the Sources tab? Double-clicking the script opens it raw in a new browser tab. Because the Sources tab organizes all assets by their source domains (along with folder paths), it can be time consuming to locate a particular script, if you don't know immediately where it came from. You have to switch back and forth between Network and Sources, taking note of the domain and folder path in the

“Save as” from Google chrome Developer Tools Network tab missing

眉间皱痕 提交于 2019-12-07 14:09:07
问题 If I right click an entry in the network tab in google chromes developer tools network tab, I get theese alternatives: Copy (open a sub menu with Copy Link Address, Copy Request headers, Copy Response headers, Copy response, Copy as cURL (cmd), Copy as cURL (bash), Copy all as cURL (cmd), Copy all as cURL (bash), Copy all as HAR) Save as HAR with content Clear browser cache Clear browser cookies Block request URL Block request Domain Open in Sources panel Open in new tab Questions Where is

Is it possible to show only User Defined Functions & Properties in Google Chrome's console?

梦想的初衷 提交于 2019-12-07 13:29:07
问题 In Firebug you can set the output of the DOM tab to only show user defined functions and properties. This is helpful for checking if you have objects escaping into the global namespace. Is there an equivalent in Chrome? 回答1: Here's a close approximation: Console version: var current; for(current in window) { /* If the property is not null or undefined */ if (!!window[current] ) { /* If the constructor is the Function object */ if (/Function/.test(String(window[current].constructor) ) ) { /*

Run a specified function when the user opens a new tab in Chromium

落花浮王杯 提交于 2019-12-07 13:14:27
I want to remove the most visited thumbnails from Chromium's “New Tab” page. After inspecting the contents of that page, I determined that the following line of JavaScript does the trick: document.getElementById("most-visited").remove(); But I still have one remaining problem: How do make it so that this line runs automatically when I open a new tab? Presumably I have to wrap it in a function and register an event handler, but I've been unable to find more precise information. EDIT: It seems that Chromium explicitly prevents tampering with the “New Tab” page. I debugged Haibara Ai's solution

Chrome Inspect Device not showing android app

北城余情 提交于 2019-12-07 12:39:26
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. Found answer on Remote Debugging WebViews on Google Developers. This method has been added in API Level 19 ,

Remote Debugging Chrome on Android issue

元气小坏坏 提交于 2019-12-07 12:21:28
问题 I am have issues using the remote debugging feature of the Chrome Developers tools with my Android device (LG Nitro running Android version 4.0.4). It was working perfectly several days ago but now my device never appears on the about:inspect page. I have followed and carefully considered these instructions including the troubleshooting tips. I have also searched for the answer to my problem but have not been able to find anything that works. I am using Chrome version 35.0.1916.141 on my

How to get notified on window resize in chrome browser

有些话、适合烂在心里 提交于 2019-12-07 09:51:29
I am writing an extension for chrome browser where , I wanted to add event listener for the window resize event. I am getting my method executed for window load event , but not getting for resize event. Below mention is code for my manifest.json file { "name": "A browser action", "version": "1.0", "background": { "scripts": ["background.js"] }, "permissions": [ "tabs", "http://*/*" ], "manifest_version": 2 } Below mention is code for my background.js file. var myExtension = { init: function() { // The event can be DOMContentLoaded, pageshow, pagehide, load or unload. alert("ASHSIH"); window

Extra render time in Chrome Dev Tools Timeline Frames

假如想象 提交于 2019-12-07 09:13:36
There are plenty of videos and tutorials out there geared towards reducing the compositing, layout, and paint times for a frame using Dev tools, but I'm not clear of what to do once those times are well below the allotted time, but the frame still takes far too long to render. Any tips on determining what exactly is happening in a frame that causes it to render so slowly? Paul Irish and Paul Lewis touch this topic briefly here . According to this video, white bar indicates browser waiting for a CPU or a GPU and there is nothing that developer can do to fix this (assuming that he is working on

Chrome Debugging Protocol: HeapProfiler.getHeapSnapshot Ignores Callback

萝らか妹 提交于 2019-12-07 07:39:53
问题 I'm working on a testing suite (implemented as a Chrome extension) that programmatically takes and analyzes heap snapshots with Chrome/Chromium's remote debugging protocol. Because Profiler.* doesn't seem to be part of the public protocol, I'm using this page for reference. Right now, I'm able to take a heap snapshot by calling HeapProfiler.takeHeapSnapshot like in the snippet below. However, when I try calling HeapProfiler.getHeapSnapshot , my callback is completely ignored. var debuggerId =

Puppeteer: How to get the contents of each element of a nodelist?

懵懂的女人 提交于 2019-12-07 07:23:47
问题 I'm trying to achieve something very trivial: Get a list of elements, and then do something with the innerText of each element. const tweets = await page.$$('.tweet'); From what I can tell, this returns a nodelist, just like the document.querySelectorAll() method in the browser. How do I just loop over it and get what I need? I tried various stuff, like: [...tweets].forEach(tweet => { console.log(tweet.innerText) }); 回答1: page.$$(): You can use a combination of elementHandle.getProperty() and