Lab Manual: https://pdos.csail.mit.edu/6.824/labs/lab-mr.html

Github:


Initial Setup

Used JetBrains GoLand as IDE and setting up labs with debugging capability’s been a mess

Used Delve which is better debugger than GDB for Golang

Since it’s not module but individual files, to be ran, I opted for remote debugging individually

image.png

These are the modified commands and arguments are sent after -- at the end

send -race arg with all commands including plugin, to test for race conditions

There’s also Debugging by Pretty Printing mentioned in manual

Using below DPrintf snippet instead of log.Printf can be useful

const Debug = true // or false

func DPrintf(format string, a ...interface{}) (n int, err error) {
	if Debug {
		log.Printf(format, a...)
	}
	return
}

Development