This is an extension of the vscode-js-console-utils by @whtouche For the original extension go to the Visual Studio Code Marketplace
This extension is available for free in the Visual Studio Code Marketplace
To insert a console method chose any of the following commands (Note: The actions below are available in all log types ):
Windows: Shift + Win + L
Mac: Shift + Cmd + L
Windows: Shift + Win + Alt + L
Mac: Shift + Cmd + Alt + L
Windows: ctrl + Shift + Win + L
Mac: ctrl + Shift + Cmd + L
Windows: ctrl + Alt + Win + L
Mac: ctrl + Alt + Cmd + L
- Highlight a variable (or really any text)
- execute insert log command of your choice.
- The output (on a new line) will be: console.log('variable: ', variable);
- Highlight multiple variables
- execute insert log command of your choice.
- The output (below each selection) will be: console.log('variable: ', variable);
- Highlight variable and a destination (via ctrl + click)
- execute insert log command of your choice.
- The output will be placed at the secondary location.
- Highlight variables and a destination (via ctrl + click)
- execute insert log command of your choice.
- The output will be placed at the secondary location with the variables contained within an object.
- Without highlighting any values select one or many locations to insert a console.log.
- execute insert log command of your choice.
- The output (on the same line) will be: console.log();
- Press Cmd+Shift+D
- This will delete all console.log statements in the current document