(九大功能面板)javascript
(1)Elements元素面板
檢查和調整頁面,調試DOM,調試CSScss
(2)Network網絡面板
調試請求,瞭解頁面靜態資源分佈,網頁性能檢測html
(3)Console控制檯面板
調試javascript,查看console log日誌,交互式代碼調試java
(4)Sources源代碼資源面板
調試JavaScript頁面源代碼,進行斷點調試代碼node
(5)Application應用面板
查看&調試客戶端存儲,如Cookie,LocalStorage,SessionStorage等git
查看頁面性能細節,細粒度對網頁載入進行性能優化(高階)github
(7)Memory內存面板
JavaScript CPU分析器,內存堆分析器(高階)chrome
(8)Security安全面板
查看頁面安全及證書問題(高階)編程
(9)Audits面板
使用Google Lighthouse輔助性能分析,給出優化建議(高階)windows
打開Chrome開發者工具
查看與選擇DOM節點
- 在頁面中選擇DOM,在DOM中反向定位到頁面位置
- 在DOM中搜索(Command+F)
實時編輯HTML和DOM節點
- 編輯內容
- 編輯屬性Attributes
- 修改元素類型
- 調整這個DOM節點順序
- 像編輯器同樣編輯HTML代碼
- 隱藏/刪除/增長/拷貝節點
在Console中訪問節點
- 使用document.querySelectAll 訪問
使用$0快速訪問選中的元素
![](http://static.javashuo.com/static/loading.gif)
拷貝-> JS Path
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
在DOM中斷點調試
- 屬性修改時打斷點
break on -> attribute modifications
- 節點刪除時打斷點
break on -> node removal
- 子樹修改時打斷點
break on -> subtree modifications
![](http://static.javashuo.com/static/loading.gif)
# 在元素中動態增長類和僞類
- 狀態
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
- 元素類
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
- 新的規則
![](http://static.javashuo.com/static/loading.gif)
快速調試CSS數值及顏色圖形動畫等
1)可視化
![](http://static.javashuo.com/static/loading.gif)
推薦網站:
console面板簡介與交互式命令
- 運行javascript代碼,交互式編程
- 查看程序中打印的log日誌
- 斷點調試代碼Debugging
在console中調試日誌
- console.log 打印信息
- console.warn 告警信息
- console.error 錯誤信息
- console.table 展現JSON格式的複雜信息
![](http://static.javashuo.com/static/loading.gif)
- console.group 信息組展現
![](http://static.javashuo.com/static/loading.gif)
- console.custom 定製樣式
![](http://static.javashuo.com/static/loading.gif)
%c 爲第二個參數styles
- Network網絡請求錯誤展現
調試Javascript的基本流程
Sources面板
![](http://static.javashuo.com/static/loading.gif)
使用Snippets來輔助Debugging
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
使用Network詳細分析請求