Skip to content

Instantly share code, notes, and snippets.

@cijohnson
cijohnson / GO Debug - Delve
Last active March 11, 2021 19:06
Debugging go binary
Below steps are followed to install go/dlv and debug the running golang process in container.
export GOVERSION=1.14
yum install -y git wget
cd /; wget https://golang.org/dl/go$GOVERSION.linux-amd64.tar.gz
cd /; tar -C /usr/local -xzf go$GOVERSION.linux-amd64.tar.gz
cd /; export PATH=$PATH:/usr/local/go/bin
cd /; go get -u github.com/go-delve/delve/cmd/dlv
cd /; export PATH=$PATH:$PWD/go/bin:/root/go/bin
export GOPATH=/go
1. Install pathogen.vim
------------------------
- mkdir -p ~/.vim/autoload
- curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
2. Add runtime path manipulation
---------------------------------
Write the following in ~/.vimrc
execute pathogen#infect()
syntax on