google-chrome-devtools

How can a chrome extension add a floating bar at the bottom of pages?

江枫思渺然 提交于 2019-11-30 13:31:59
问题 I am creating a chrome extension that needs to inject a floating element (i.e position:fixed ) at the bottom of pages . My requirements are: I need to access elements inside it from a content script. This is because I attach events to buttons so the user can perform actions on the current tab from the floating bar. I want it's styles to remain as independent from styles of the current page. So far I have tryed three solutions and came up with nothing. content script injecting a fixed html

possible to refresh chrome dev tools watch expressions manually or by code?

空扰寡人 提交于 2019-11-30 12:26:26
Taking a look at https://developer.chrome.com/devtools/docs/tips-and-tricks#favorite-expression If I don't set any breakpoints, then I have to manually click on the refresh icon in the watch expressions panel. It would be nice if I could put in some debugging code to update the watch expressions without ever having to enter debug mode. Something like this: // some update function setInterval(function() { console.refresh(); }, 1000); update Check out Live Expressions . These are similar to Watch Expressions, expect they're in the Console and they update in real-time. original wOxxOm's hack for

Chrome developer tools > resources > cookies > http column, does a checkmark here indicate HttpOnly cookie?

孤街醉人 提交于 2019-11-30 12:23:37
问题 Does the checkmark at the Http column of Chrome devtool's Cookie resource panel indicate a HttpOnly cookie? I can't find docs that confirm this, though I suspect it is the case. I am trying to verify my app is using HttpOnly for session cookies. 回答1: Yes. Enter document.cookie in the console, and you'll see that none of the checked cookies are visible. HTTP = HttpOnly flag, Secure = secure flag. 回答2: Yes. Right click on your page or press F12 button. This will open developers tools window. Go

Using Google Chrome remote debugging protocol

笑着哭i 提交于 2019-11-30 12:02:56
问题 I need to get the network events from Chrome. I've found this: https://developer.chrome.com/devtools/docs/debugger-protocol https://developer.chrome.com/devtools/docs/protocol/1.1/network#command-enable It seems that Chrome uses a port to get messages, answer and send events, for remote debugging. It says it uses JSON, so I decided to try it. So, I wrote some simple java code that opens the port that chrome is listening on (ofcourse i've started it by using google-chrome --remote-debugging

Javascript call programmatically the “Save as PDF” feature of Chrome dialog print

北城余情 提交于 2019-11-30 11:51:29
问题 Google Chrome have the option "Save as PDF" when you enter the Print dialog or window.print(). The user need to choice this option in dialog to save the page as pdf. Can I call some funcion or pass an argument to window.print() in chrome to "print" the page as a pdf without the print dialog appears? Any ideas? 回答1: Unfortunately there isn't any param you could pass to window.print(); and force it to print pdf unless there is a pdf driver plugin already present on the client's browser. There

How do I cd into an iframe in chrome developer tools or firebug lite in chrome?

拟墨画扇 提交于 2019-11-30 11:44:59
when I try cd, console says "cd is not defined" Yes, you are right Firebug have this awesome command. I really like it. It's making wotking with iframes much easier. Personally I don't go to Firefox just because the cd() is available in it because I can do whatever I can do with cd in chrome dev tools too. Just use contentWindow keyword in your command prompt to access the iframe window Object. Then you will be good to access any function and variable out there. For example I have a variable in my iframe that is not accessible via console normally. But still I can access to the variable via

Hiding violations in Chrome Dev Console

做~自己de王妃 提交于 2019-11-30 11:41:43
问题 Starting a few versions ago, Google Chrome has started showing JS violations in the developer console. While that can be useful sometimes, more often it is just cluttering the console. Is there a way to disable these violations? As a side note, also since recently, the developer console no longer features checkboxes for the various types of debug output. Now you only have log levels: Verbose, Info, Warnings, Errors. I find the former method with checkboxes much more useful - is there some way

How do I prevent Chrome developer tools from closing when the current browser window closes?

筅森魡賤 提交于 2019-11-30 11:33:56
问题 I'm trying to use the chrome developer tools to debug an issue I'm having with Twitter oauth. When the oauth window appears, I open the developer tools to monitor the requests - but as soon as the oauth window closes the developer tools window is also closed. I'd like to be able to keep the developer tools window open so that I can inspect the requests made. Is this possible? 回答1: Not a perfect solution, but you can add breakpoints on the events Window.close and unload by turning on the

Google Chrome Developer Tools : Android Debugging returns HTTP/1.1 404 Not Found. Why?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 11:33:42
This was working fine up until yesterday. Now when I connect my Android device for USB Debuggers. Chrome is no longer display my app. Now the popup window shows HTTP/1.1 404 Not Found. Looks to be connecting fine and the app runs fine on my Mobile Device. Solution was to access through chrome://inspect/#devices Then select the "Fallback" option. This is because the remote browser was newer than the client browser…… This problem just showed up on the latest released version of Chrome 72.0.3626.76 (will they ever add a regression test?). None of these answers were completely satisfying. I was

Get line number in Elements window of Chrome Developer Tools?

走远了吗. 提交于 2019-11-30 11:10:52
In Chrome, Tools -> Developer Tools -> Elements tab. There are no line numbers next to the source code. Is there a way to toggle them on? Don't know how useful it will be, but you can right click on the html element in the Elements tab, select "Copy as HTML" and paste the results in your favorite text editor. That will give you line numbers for the DOM as it exists at the point where you copy it. Like the comments point out, this will not correspond to source line numbers. Eugenio Chaparro There is no way to show number line in developer area. You can press CTRL + U in the webpage where you