1. Open the vscode
  2. Add custom code snippets:
    1. Press CTRL + Shift + P, type configure User Snippet, select the first one
    2. Choose javascript
    3. Add the following code
    {
    	"mylog": {
    	"prefix": "mylog"."body": [
    		"console.log({$1})".""]."description": "mylog"
    }
    Copy the code
  3. Open a JS file, type mylog and press TAB.
  4. If you want to change the trigger directive, change the value of the prefix field above.