A quickly generate console.log extension in vscode
- Move the cursor near in variable.
- Press
Cmd + Shift + L
(Mac) orCtrl + Shift + L
(Windows). - Next line will be:
console.log('variable:', variable)
- Press
Cmd + Shift + K
(Mac) orCtrl + Shift + K
(Windows).
- Press
Cmd + Shift + J
(Mac) orCtrl + Shift + J
(Windows).
Property | Description | Default |
---|---|---|
consoleVariablesName | Whether to output variable name | true |
consoleLineNumber | Whether to output line number | false |
consoleFilename | Whether to output filename | false |
consoleColon | Whether to output colon at the end | true |
Example:
console.log('Variables at line 17 in Components/Card.tsx:', Variables)
You can go to the Settings page and change the configuration to your preferences
✨ Happy hacking!
MIT License © 2022 Richard Zhang