banner
Bai

Bai

写代码菜的一批 🤣
twitter
telegram
tg_channel
pixiv
github
bilibili
whatsapp

Reference for Chrome Developer Tools Shortcuts to Improve Development Efficiency【Article Import Test】

This article only introduces some of the main and commonly used shortcuts in Chrome. They can be compared to the developer tools in other browsers, as most shortcuts have the same functions, with only a few differences.

Global (All Panels)#

FunctionShortcutDescription
Open Developer ToolsF12 / Ctrl + Shift + INormal opening
Open ConsoleCtrl + Shift + JOpen the tool and enter the Console panel
Inspect ElementCtrl + Shift + CStart selecting page elements after entering the Elements panel
Developer Tools Settings?/F1All related settings for the developer tools
Switch to Previous PanelCtrl + [Switch left to the previous panel
Switch to Next PanelCtrl + ]Switch right to the next panel
Switch Docking PositionCtrl + Shift + DSwitch the entire tool's docking position relative to the browser, depending on the last two operations
Toggle Device ModeCtrl + Shift + MSwitch between normal mode and responsive device editing mode
Toggle Drawer ToolbarEscToggle the display of the popup toolbar at the bottom of the tool, such as Console, etc.
Refresh PageF5/Ctrl + RNormal refresh of the page, which reads from memory cache and disk cache
Force RefreshCtrl + F5/Ctrl + Shift + RDisable cache refresh, similar to refreshing after checking disable cache
Search in Current PanelCtrl + FSearch text in the current panel, such as Elements, Console, etc.
Search in All ResourcesCtrl + Shift + FSearch text in all resources loaded by the current webpage (Sources)
Search by FilenameCtrl + O/Ctrl + PSearch all resources, but limit the search object to file names
Increase Font SizeCtrl + +Increase the font and graphics size of the entire developer tool (excluding the webpage)
Decrease Font SizeCtrl + -Decrease the size of the developer tool's font and graphics
Reset Font SizeCtrl + 0Restore the font and graphics size of the developer tool to default size

Elements Panel#

FunctionShortcutDescription
Undo ChangesCtrl + ZUndo modifications to the HTML content
Redo ChangesCtrl + YRestore modifications made before undo
Expand Node (Right Arrow Key)Expand the currently collapsed HTML element node
Collapse Node (Left Arrow Key)Collapse the currently expanded HTML element node
Recursively Expand NodeAlt + →Recursively expand the currently collapsed HTML element node
Recursively Collapse NodeAlt + ←Recursively collapse the currently expanded HTML element node
Edit Node AttributeEnterEdit the attribute value of the current element node (the first attribute)
Edit Next AttributeTabAfter pressing Enter to edit an attribute, press Tab to switch to the next attribute
Edit Previous AttributeShift + TabSwitch to edit the previous attribute value of the current element node
Hide NodeHHide the current element node on the page, effectively setting visibility: hidden !important; style
Edit HTMLF2Edit the current element node content in HTML format, similar to the right-click menu's Edit as HTML
Edit Source StyleCtrl + ClickIn the Style panel, Ctrl + mouse click on a CSS rule (selector, property, or property value) will jump to the corresponding position in the source file
Toggle Color TypeShift + ClickShift + click on the color value box to toggle between #, rgb(), hls()
Increment/Decrement Value/ (Up, Down Arrow Keys)Increment/decrement the size by 1 unit
0.1x Increment/Decrement ValueAlt + ↑/Alt + ↓Increment/decrement by 0.1x unit value
10x Increment/Decrement ValueShift + ↑/Shift + ↓Increment/decrement by 10x unit value
100x Increment/Decrement ValueCtrl + ↑/Ctrl + ↓Increment/decrement by 100x unit value

Console Panel#

FunctionShortcutDescription
Clear OutputCtrl + LClear the history output of the console
Focus InputCtrl + ` (Backtick)Focus the input to the console input box; using it in other panels opens the Console drawer
Accept SuggestionEnter/Accept the first suggestion of code hints
Switch Command/Switch to the previous/next historical input command
Run CodeEnterPress Enter to run the input code
New Line InputShift + EnterSince pressing Enter directly runs the code, you need to add Shift to input a new line

Sources Panel#

FunctionShortcutDescription
Execute ScriptF8/Ctrl + \Toggle execution or pause of the script
Step OverF10/Ctrl + 'Step through the script in the Debugger panel
Step IntoF11/Ctrl + ;Step into debugging (jump into a function when encountered)
Step OutShift + F11/Ctrl + Shift + ;Step out of debugging (jump out of the current function)
Next Call FrameCtrl + . (English period)Switch to the next frame in the Call Stack panel during debugging
Previous Call FrameCtrl + , (English comma)Switch to the previous frame in the current call during debugging (ignore if at the top of the stack)
Output Variable ValueCtrl + Shift + EOutput the value of the selected variable in the console
Watch Variable ValueCtrl + Shift + AAdd the selected variable value in the editor to the Watch panel
Toggle BreakpointCtrl + BToggle whether the current line is set as a breakpoint when focused in the code editor
Toggle Enable BreakpointCtrl + Shift + BToggle whether the breakpoint on the current line is enabled (will not delete the breakpoint)
Toggle Enable All BreakpointsCtrl + F8Toggle whether all set breakpoints are enabled
Edit BreakpointCtrl + Alt + BEdit the type of breakpoint on the current line (Breakpoint, Conditional Breakpoint, Logpoint)

Code Editor (in Sources Panel)#

FunctionShortcutDescription
Toggle CommentCtrl + /Add/remove comments for the current line or selected content
Save ChangesCtrl + SSave modifications to the file (requires enabling the Overrides feature in the sidebar)
Save All ChangesCtrl + Alt + SSave all files opened in the editor, also requires enabling Overrides
Go to Matching BraceCtrl + MJump to the matching brace of the current cursor position
Add Matching ItemCtrl + DJump and add the next matching text to the selected text
Undo Matching ItemCtrl + UGo back and undo selecting a matching item, opposite of Ctrl + D
Go to LineCtrl + GJump to a specified line number
Go to MemberCtrl + Shift + OJump to a specified member function in the current file
Previous Edit LocationAlt + -Jump to the previous edit location of the cursor
Next Edit LocationAlt + +Jump to the next edit location
Close Active TabAlt + WClose the currently edited tab (file)
Increment/Decrement CSS ValueAlt + ↑/Alt +↓When editing CSS source files, increment/decrement the current value by 1 unit
10x Increment/Decrement CSS ValueAlt + PageUp↑/Alt + PageDownIncrement/decrement the current value in CSS by 10 units
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.