Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Go Log UtilsNew to Visual Studio Code? Get it now.
Go Log Utils

Go Log Utils

gpng

|
469 installs
| (1) | Free
Help insert and remove log.(Printf|Println|Print) statements
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

go-log-utils README

Easily insert and remove log.(Printf|Println|Print) in go files

Credit to javascript-console-utils

Features

In any .go file,

With selection:

  • Highlight a variable, or multiple variables (works best if they are on the same line)
  • Press Cmd+Shift+L (Mac) or Ctrl+Shift+L (Windows)
  • The output on a new line will be: log.Printf("variables: %v...", variables...)

Without selection:

  • Press Cmd+Shift+L (Mac) or Ctrl+Shift+L (Windows)
  • The output on a new line will be: log.Printf()

To remove logs:

  • Press Cmd+Shift+D (Mac) or Ctrl+Shift+D (Windows)
  • This will delete all log.(Printf|Println|Print) statements in the current active document

TODO

  • Configuration option for deleting other log statements, such as log.Fatal, log.Panic etc.

Contributing

Please contribute!

License

MIT © 2020 gpng

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft