Skip to content

Instantly share code, notes, and snippets.

@andras-hegedus
Created December 8, 2017 14:51
Show Gist options
  • Save andras-hegedus/9f12e8ca50c425b1bccd6ab0176d92ec to your computer and use it in GitHub Desktop.
Save andras-hegedus/9f12e8ca50c425b1bccd6ab0176d92ec to your computer and use it in GitHub Desktop.
VS Code logging snippet
{
"Print to console": {
"prefix": "logvar",
"body": [
"console.log('Filename: ${TM_FILENAME} Line: ${TM_LINE_NUMBER}', $1)"
],
"description": "Log variable to console"
},
"JSON Print to console": {
"prefix": "jsonlog",
"body": [
"console.log('Filename: ${TM_FILENAME} Line: ${TM_LINE_NUMBER}', JSON.stringify($1, null, ' '))"
],
"description": "Log variable to console using JSON stringify"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment