This extension helps you to generate console.log lines with the selected text in the editor, very useful for every javascript developer (now with support for Dart and Go).
English | Spanish |
---|---|
running the command Console.log
will generate a console.log sentence in the line above, taking care of identation.
you can use also the keybinding [ alt + - ]
or [ alt + / ]
in Windows, Linux and MacOSX
Example outputs:
javascript / typescript / vue / svelte
let enabled = true;
// press [ ⌥ + - ] or [ ⌥ + / ] selecting 'enabled' will produce ↓↓↓
console.log("enabled :", enabled);
dart
bool enabled = true;
// press [ ⌥ + - ] or [ ⌥ + / ] selecting 'enabled' will produce ↓↓↓
debugPrint("${enabled}}", wrapWidth: 1024);
go
enabled := true;
// press [ ⌥ + - ] or [ ⌥ + / ] selecting 'enabled' will produce ↓↓↓
fmt.Printf("enabled: %#v", enabled);
If you want your log in the line before and not after, just add shift:
javascript / typescript / vue / svelte
console.log("enabled :", enabled);
// press [ ⌥ + - + ⇧ ] or [ ⌥ + / + ⇧ ] selecting 'enabled' will produce ↑↑↑
let enabled = true;
Support for Dart(print) and Go(fmt.Println)
Initial release.