godbg
Implementation of Rusts `dbg!` macro for quick and easy debugging during development
About godbg
godbg 🐛 
godbg is an implementation of the Rust2018 builtin debugging macro dbg.
The purpose of this package is to provide a better and more effective workflow for people who are "print debuggers".
go get github.com/tylerwince/godbg
The old way:
package main
import "fmt"
func main() {
a := 1
fmt.Printf("My variable: a is equal to: %d", a)
}
outputs:
My variable: a is equal to: 1
The new (and better) way
package main
import . "github.com/tylerwince/godbg"
func main() {
a := 1
Dbg(a)
}
outputs:
[main.go:7] a = 1
This project is a work in progress and all feedback is appreciated.
The next features that are planned are:
- Tests
- Fancy Mode (display information about the whole callstack)
- Performance Optimizations
- Typing information
Frequently Asked Questions
What is godbg?
godbg is a Go Tools library for the Go programming language. Implementation of Rusts `dbg!` macro for quick and easy debugging during development
How do I install godbg?
Install godbg with the Go module system using `go get tylerwince/godbg`. Check the repository for the current installation instructions.
What category does godbg belong to?
godbg is listed under Go Tools, specifically Go Tools.