├── .gitignore └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | **/bin 8 | 9 | # Test binary, built with `go 04-test -c` 10 | *.test 11 | 12 | # Output of the go coverage tool, specifically when used with LiteIDE 13 | *.out 14 | 15 | # Dependency directories (remove the comment below to include it) 16 | # vendor/ 17 | 18 | **/__debug_bin 19 | 20 | .idea 21 | 22 | **/ptyme 23 | **/trie -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ultimate Go Debugging Course 2 | 3 | This repo holds the example code and course information for the Ultimate Go Debugging course. 4 | 5 | This course will teach you various techniques that can be used to debug a Go program. 6 | 7 | ## Getting Started 8 | 9 | First, you should have the latest version of Go. You can get the latest version from https://go.dev/dl/. 10 | Once you download the tarball follow the instructions on https://go.dev/doc/install to install Go on your system. 11 | To verify a correct Go install run the following command: 12 | 13 | ``` 14 | go version 15 | ``` 16 | 17 | You should see output similar to: 18 | 19 | ``` 20 | go version go1.17.6 linux/amd64 21 | ``` 22 | 23 | Second, once you have Go installed you must install Delve. You can install the latest version of Delve via: 24 | 25 | ``` 26 | go install github.com/go-delve/delve/cmd/dlv@latest 27 | ``` 28 | 29 | You can verify Delve has been correctly installed by running the following command: 30 | 31 | ``` 32 | dlv help 33 | ``` 34 | 35 | The full install documentation is [here](https://github.com/go-delve/delve/tree/master/Documentation/installation) if needed. 36 | 37 | ## What we will cover 38 | 39 | ### Day 1 40 | 41 | * Basics of using Debugging 42 | * Intro into CLI usage 43 | * Getting familiar with debugging mindset 44 | * How debuggers work 45 | 46 | ### Day 2 47 | 48 | * Deeper dive into debug commands within debug session 49 | * How to debug core dumps 50 | * Record & Replay debugging 51 | 52 | ### Day 3 53 | 54 | * Introduction to JSON-RPC API 55 | * How to use JSON-RPC API 56 | * How to script the debugger 57 | * Remote debugging 58 | 59 | ### Day 4 60 | 61 | * Debugging in containers 62 | * Debugging in Kubernetes 63 | 64 | ### Day 5 65 | 66 | * Debugging through performance analysis 67 | * How to use pprof 68 | * How to use perf 69 | * Deep dive into Delve internals 70 | * Deep dive into Go internals 71 | * Wrapup --------------------------------------------------------------------------------