Wrap Log Simple
A super simple way to log variables in VSCode regardless of your language!
This was originally developed here https://github.com/midnightsyntax/vscode-wrap-console-log
Features
This extension will read the word under your cursor and insert it into the log function (console.log by default)
alt (option on mac) + L: console.log("variable");
cmd + L: console.log("variable", variable);
Not using Javascript? No problem! Wrap Log Simple can be modified on a per-language basis by updating your settings.json.
Example using Go:
"[go]": {
"wrap-log-simple.functionName": "fmt.Println",
"wrap-log-simple.useSemicolon": false,
"wrap-log-simple.useSingleQuotes": false,
},
Will output
func main() {
l := "log"
fmt.Println(l) // alt + L
fmt.Println("l", l) // cmd + L
}
| |