{"id":560,"date":"2011-05-21T18:45:15","date_gmt":"2011-05-21T16:45:15","guid":{"rendered":"https:\/\/d-mueller.de\/blog\/?p=560"},"modified":"2011-05-21T18:45:15","modified_gmt":"2011-05-21T16:45:15","slug":"chrome-dev-tools-insidertipps","status":"publish","type":"post","link":"https:\/\/d-mueller.de\/blog\/chrome-dev-tools-insidertipps\/","title":{"rendered":"Chrome Dev Tools: Insidertipps"},"content":{"rendered":"<p>Chromes Version von Firebug hat sich ordentlich gemausert. Inspiriert durch <a href=\"http:\/\/www.youtube.com\/watch?v=N8SS-rUEZPg\">dieses Video<\/a> gibts hier nun also ein paar nicht so bekannte Features der Devtools.<\/p>\n<h2>Konsole \u00fcberall einblenden<\/h2>\n<p>In jedem Panel der Devtools l\u00e4sst sich mittels Druck auf <i>ESC<\/i> die Konsole hochfahren und so simultan arbeiten.<\/p>\n<div id=\"attachment_562\" style=\"width: 588px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/console-hochfahren.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-562\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/console-hochfahren.png\" alt=\"Konsole hochfahren\" title=\"Konsole hochfahren\" width=\"578\" height=\"233\" class=\"size-full wp-image-562\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/console-hochfahren.png 578w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/console-hochfahren-300x120.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/a><p id=\"caption-attachment-562\" class=\"wp-caption-text\">Konsole hochfahren<\/p><\/div>\n<p>Weitere <a href=\"http:\/\/code.google.com\/chrome\/devtools\/docs\/shortcuts.html\">Shortcuts gibts hier<\/a>.<\/p>\n<h2>Die Funktionen dir() und copy()<\/h2>\n<p>Bekanntlich l\u00e4sst sich durch Eingabe des DOM-Elements in die Konsole das HTML dazu selektiv anzeigen (siehe Bild oben: <i>document.body<\/i>). Mittels der Funktion <b>dir()<\/b> l\u00e4sst sich eine weit detailliertere Auflistung anzeigen, die u.a. auch Event Handler anzeigt:<\/p>\n<div id=\"attachment_563\" style=\"width: 438px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/dir.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-563\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/dir.png\" alt=\"dir\" title=\"dir\" width=\"428\" height=\"308\" class=\"size-full wp-image-563\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/dir.png 428w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/dir-300x215.png 300w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><\/a><p id=\"caption-attachment-563\" class=\"wp-caption-text\">dir<\/p><\/div>\n<p>Mit <b>copy()<\/b> l\u00e4sst sich Text in die Zwischenablage kopieren. <\/p>\n<pre data-enlighter-language=\"enlighter\" class=\"EnlighterJSRAW\">copy(document.body.innerText)<\/pre>\n<p>Danach befindet sich der gesamte lesbare Text der Webseite in der Zwischenablage.<\/p>\n<p>Ach, bevor ichs vergesse: <i>$0<\/i> ist eine Referenz auf das aktuell markierte Element:<\/p>\n<div id=\"attachment_573\" style=\"width: 267px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/0.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-573\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/0.png\" alt=\"$0\" title=\"$0\" width=\"257\" height=\"206\" class=\"size-full wp-image-573\" \/><\/a><p id=\"caption-attachment-573\" class=\"wp-caption-text\">$0<\/p><\/div>\n<h2>Farbmodell wechseln<\/h2>\n<p>Per Klick auf den farbigen Kasten l\u00e4sst sich das Farbmodell togglen. Zur Verf\u00fcgung steht die Hex-Anzeige von RGB, RGB in ausgeschriebener Form und das sehr intuitive <a href=\"http:\/\/en.wikipedia.org\/wiki\/HSL_and_HSV\">HSL<\/a>.<br \/>\n<div id=\"attachment_564\" style=\"width: 323px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-564\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode.png\" alt=\"HEX\" title=\"HEX\" width=\"313\" height=\"68\" class=\"size-full wp-image-564\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode.png 313w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode-300x65.png 300w\" sizes=\"auto, (max-width: 313px) 100vw, 313px\" \/><\/a><p id=\"caption-attachment-564\" class=\"wp-caption-text\">HEX<\/p><\/div><\/p>\n<div id=\"attachment_565\" style=\"width: 313px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-565\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode2.png\" alt=\"RGB\" title=\"RGB\" width=\"303\" height=\"68\" class=\"size-full wp-image-565\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode2.png 303w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode2-300x67.png 300w\" sizes=\"auto, (max-width: 303px) 100vw, 303px\" \/><\/a><p id=\"caption-attachment-565\" class=\"wp-caption-text\">RGB<\/p><\/div>\n<div id=\"attachment_566\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-566\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/colormode3.png\" alt=\"HSL\" title=\"HSL\" width=\"300\" height=\"63\" class=\"size-full wp-image-566\" \/><\/a><p id=\"caption-attachment-566\" class=\"wp-caption-text\">HSL<\/p><\/div>\n<h2>Dateirevisionen<\/h2>\n<p>Wenn man im &#8222;Element untersuchen&#8220; Modus CSS-\u00c4nderungen vornimmt und anschlie\u00dfend auf die CSS-Datei klickt (markiert), hat man nun die M\u00f6glichkeit, alte Revisionen anzusehen und diese wiederherzustellen. <\/p>\n<p><div id=\"attachment_567\" style=\"width: 511px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-567\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision1.png\" alt=\"File Revision 1\" title=\"File Revision 1\" width=\"501\" height=\"81\" class=\"size-full wp-image-567\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision1.png 501w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision1-300x48.png 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><p id=\"caption-attachment-567\" class=\"wp-caption-text\">File Revision 1<\/p><\/div><br \/>\n<div id=\"attachment_568\" style=\"width: 553px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-568\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision2.png\" alt=\"File Revision 2\" title=\"File Revision 2\" width=\"543\" height=\"198\" class=\"size-full wp-image-568\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision2.png 543w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision2-300x109.png 300w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><\/a><p id=\"caption-attachment-568\" class=\"wp-caption-text\">File Revision 2<\/p><\/div><\/p>\n<p>In den <a href=\"http:\/\/tools.google.com\/dlpage\/chromesxs\">Chrome canary builds<\/a> (Entwicklungsversion) gibt es dann zus\u00e4tzlich noch die M\u00f6glichkeit, das CSS direkt aus dieser Ansicht heraus zu speichern.<\/p>\n<div id=\"attachment_569\" style=\"width: 315px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-569\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision3.png\" alt=\"File Revision 3\" title=\"File Revision 3\" width=\"305\" height=\"166\" class=\"size-full wp-image-569\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision3.png 305w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/file-revision3-300x163.png 300w\" sizes=\"auto, (max-width: 305px) 100vw, 305px\" \/><\/a><p id=\"caption-attachment-569\" class=\"wp-caption-text\">File Revision 3<\/p><\/div>\n<h2>Codeformatierung<\/h2>\n<p>Leider ebenfalls noch dem Canary-Build vorbehalten: Pretty Printing von Code. Minifiziertes Javascript l\u00e4sst sich so sch\u00f6n betrachten:<\/p>\n<div id=\"attachment_571\" style=\"width: 602px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-571\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung.png\" alt=\"Codeformat: Auf die Klammern klicken\" title=\"Codeformat: Auf die Klammern klicken\" width=\"592\" height=\"320\" class=\"size-full wp-image-571\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung.png 592w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung-300x162.png 300w\" sizes=\"auto, (max-width: 592px) 100vw, 592px\" \/><\/a><p id=\"caption-attachment-571\" class=\"wp-caption-text\">Codeformat: Auf die Klammern klicken<\/p><\/div>\n<p>Anschlie\u00dfend sieht es dann so aus:<\/p>\n<div id=\"attachment_572\" style=\"width: 592px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung-21.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-572\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung-21.png\" alt=\"Formatiert\" title=\"Formatiert\" width=\"582\" height=\"318\" class=\"size-full wp-image-572\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung-21.png 582w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/formatierung-21-300x163.png 300w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/a><p id=\"caption-attachment-572\" class=\"wp-caption-text\">Formatiert<\/p><\/div>\n<h2>Die Timeline<\/h2>\n<p>Kein wirklicher Geheimtipp, aber trotzdem von vielen vernachl\u00e4ssigt: Die superm\u00e4chtige Timeline-Ansicht. Hier verr\u00e4t euch Chrome, was so im Hintergrund alles abgeht. Reflows, Repaints, Requests&#8230; Alles wunderbar aufgelistet:<br \/>\n<div id=\"attachment_574\" style=\"width: 663px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/timeline.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-574\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/timeline.png\" alt=\"Timeline\" title=\"Timeline\" width=\"653\" height=\"391\" class=\"size-full wp-image-574\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/timeline.png 653w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/timeline-300x179.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/a><p id=\"caption-attachment-574\" class=\"wp-caption-text\">Timeline<\/p><\/div><\/p>\n<h2>Remote Debugging<\/h2>\n<p>Das meiner Meinung nach geilste Feature im Canary Build (was es hoffentlich so schnell wie m\u00f6glich in die offizielle Version schafft!): Remote Debugging. Dazu startet ihr Chrome einfach mit dem Parameter <\/p>\n<pre data-enlighter-language=\"enlighter\" class=\"EnlighterJSRAW\">--remote-debugging-port=&lt;portnummer&gt;<\/pre>\n<div id=\"attachment_575\" style=\"width: 378px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/debugging-port.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-575\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/debugging-port.png\" alt=\"Remote Debugging\" title=\"Remote Debugging\" width=\"368\" height=\"526\" class=\"size-full wp-image-575\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/debugging-port.png 368w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/debugging-port-209x300.png 209w\" sizes=\"auto, (max-width: 368px) 100vw, 368px\" \/><\/a><p id=\"caption-attachment-575\" class=\"wp-caption-text\">Remote Debugging<\/p><\/div>\n<p>Dann Chrome starten und in einer neuen Instanz (muss nicht der canary-build sein) auf <b>http:\/\/localhost:portnummer<\/b> connecten.<\/p>\n<p>Was wir sehen sind also erstmal die offenen Tabs der anderen Browser-Instanz.<\/p>\n<div id=\"attachment_576\" style=\"width: 630px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-576\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging.png\" alt=\"Remote Debugging\" title=\"Remote Debugging\" width=\"620\" height=\"433\" class=\"size-full wp-image-576\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging.png 620w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging-300x209.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><p id=\"caption-attachment-576\" class=\"wp-caption-text\">Remote Debugging<\/p><\/div>\n<p>W\u00e4hlen wir jetzt ein Tab aus, bekommen wir die Konsole des anderen Browsers pr\u00e4sentiert und k\u00f6nnen uns austoben. Superpraktisch, wenn man bspw. f\u00fcr mobile Ger\u00e4te entwickelt.<\/p>\n<div id=\"attachment_578\" style=\"width: 599px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging21.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-578\" src=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging21.png\" alt=\"Remote Console\" title=\"Remote Console\" width=\"589\" height=\"409\" class=\"size-full wp-image-578\" srcset=\"https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging21.png 589w, https:\/\/d-mueller.de\/blog\/wp-content\/uploads\/2011\/05\/remote-debugging21-300x208.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/a><p id=\"caption-attachment-578\" class=\"wp-caption-text\">Remote Console<\/p><\/div>\n<p><a href=\"http:\/\/code.google.com\/chrome\/devtools\/docs\/remote-debugging.html\">Mehr zum Remote-Debugging<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chromes Version von Firebug hat sich ordentlich gemausert. Inspiriert durch dieses Video gibts hier nun also ein paar nicht so bekannte Features der Devtools. Konsole \u00fcberall einblenden In jedem Panel der Devtools l\u00e4sst sich mittels Druck auf ESC die Konsole &hellip; <a href=\"https:\/\/d-mueller.de\/blog\/chrome-dev-tools-insidertipps\/\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,3],"tags":[],"class_list":["post-560","post","type-post","status-publish","format-standard","hentry","category-javascript","category-webdev"],"_links":{"self":[{"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/posts\/560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/comments?post=560"}],"version-history":[{"count":0,"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/posts\/560\/revisions"}],"wp:attachment":[{"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/media?parent=560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/categories?post=560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/d-mueller.de\/blog\/wp-json\/wp\/v2\/tags?post=560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}