当前位置:网站首页>Chrome debugging
Chrome debugging
2022-07-02 08:31:00 【Red blue purple】
Chrome debugging
Personal blog : Chrome debugging
Elements panel
step :
- open DevTools, There are many ways to open ,F12 Shortcut key , Right click to check
- View the style of the element to be checked , Click the red box in the figure below , Then click on the page element , Or place the mouse over the element to be checked , Right click to check
- stay DevTools Under the Styles Add, delete, and change the query style
- Class name operation
- , Direct double click Elements Class name under , You can modify the class name
- Click on "Styles" Under the ".cls" To operate
- Pseudo class selector style modification :
- stay Elements Corresponding element found in , The right choice Force state, Then select the pseudo class , Such as :hover, You can force the style change , The pseudo class style can also be found in Styles I'll make some changes
2. Click on "Styles" Under the ":hover" To operate
- When there are too many element styles , Click on "Computed", There will be all the styles of this element below , Click on "Filter", Enter the style you want to view
Console panel
You can output things in the console through the program , To check whether the program works correctly
Example :
<script>
var a = 10;
console.log(a);
var b = 15;
</script>
Log level can be selected on the left , You can flexibly use the log level
console.table() usage : You can print an array of objects , convenient
Example :
<script>
var student = [
{
name: "ttt",
code: 111,
price: 11
},
{
name: "xxx",
code: 333,
price: 11
},
{
name: "yyy",
code: 333,
price: 33
},
]
console.log(student);
console.table(student);
</script>
result :
The red box is console.table(), And on the red box is console.log()
Place holder :
Place holder | function |
---|---|
%s | character string |
%d | Integers |
%f | Floating point numbers |
%c | css Format string |
Sources panel
It is mainly used to debug JavaScript
step :
- open Sources panel , Find the to debug js Code
- Click the number on the left of the part of code to be debugged , Add Breakpoint
- Refresh the page
- Start debugging
Debugging common parts :
Screenshot of the source : Google browser debugging –Sources
A little special :
- Hover the variable with the mouse to view the variable value
- Add... To the program debugger; It is equivalent to setting a breakpoint here
- Special breakpoints ( Event breakpoints ) The addition method is different from the above , Is in Event Listener Breakpoints Add
Network panel
It can be used to simulate weak network environment
Application panel
This panel is mainly used to record all resource information loaded by the website , Including storing data (Local Storage、Session Storage、IndexedDB、Web SQL、Cookies)、 Cache data 、 typeface 、 picture 、 Script 、 Style sheets, etc .
Small skills
Use the appeal method to select elements ( node ), stay Elements Panel right click , Select the red box below to take a screenshot
Screenshot effect :
expand : Out of the 996,Chrome DevTools Panel full introduction !!!( Collection )
边栏推荐
- 2022 Heilongjiang latest construction eight members (materialman) simulated examination questions and answers
- sqli-labs第8关(布尔盲注)
- 路由基础—动态路由
- 链表经典面试题(反转链表,中间节点,倒数第k个节点,合并分割链表,删除重复节点)
- Opencv3 6.3 reduced pixel sampling with filters
- Generate database documents with one click, which can be called swagger in the database industry
- Matlab - autres
- Method recursion (Fibonacci sequence, frog jumping steps, tower of Hanoi problem)
- 文件上传-upload-labs
- OpenCV常用方法出处链接(持续更新)
猜你喜欢
Use Matplotlib to draw a preliminary chart
sqli-labs第8关(布尔盲注)
Web security -- core defense mechanism
类和对象(类和类的实例化,this,static关键字,封装)
Use the kaggle training model and download your own training model
Method recursion (Fibonacci sequence, frog jumping steps, tower of Hanoi problem)
Carsim 学习心得-粗略翻译1
Introduction to parameters of CarSim pavement 3D shape file
HCIA—应用层
16: 00 interview, came out at 16:08, the question is really too
随机推荐
樂理基礎(簡述)
C language implements XML generation and parsing library (XML extension)
DWORD ptr[]
Classes and objects (instantiation of classes and classes, this, static keyword, encapsulation)
Carsim problem failed to start Solver: Path Id Obj (X) was set to y; Aucune valeur de correction de xxxxx?
2022 Heilongjiang's latest eight member (Safety Officer) simulated test question bank and answers
idea中注释代码取消代码的快捷键
Carla-UE4Editor导入RoadRunner地图文件(保姆级教程)
Analysis of the use of comparable, comparator and clonable interfaces
W10 is upgraded to W11 system, but the screen is black, but the mouse and desktop shortcuts can be used. How to solve it
Global and Chinese market of electric cheese grinder 2022-2028: Research Report on technology, participants, trends, market size and share
力扣每日一题刷题总结:链表篇(持续更新)
Jumping | Blue Bridge Cup
C language replaces spaces in strings with%20
What are the platforms for selling green label domain names? What is the green label domain name like?
Web security -- Logical ultra vires
ARP及ARP欺骗
Opencv3 6.3 reduced pixel sampling with filters
My VIM profile
In depth understanding of prototype drawings