Goland Remote Debugging wwhen relative path's are mismatched

Hello, i'm hitting the age-old issue of the relative path compiled in the go-binary not matching the relative path of the project on my local machine, therefore the debugger won't "break". In past projects i'd compile locally and either scp the binary to the remote system or if it's a containerized environment then just rebuild and this worked great - however, i'm stepping into a project that has a well established dev workflow/toolchain which consists of building all the binaries inside a docker container (mostly b/c of cgo deps and security reasons) and live reload with air-verse.

Based on https://blog.jetbrains.com/go/2019/02/06/debugging-with-goland-getting-started/ - `You should also make sure that if you are using $GOPATH, the project is compiled using the same relative path to $GOPATH.`  that makes sense when a developer has full control, but not in my case (assuming i'm not alone here). 

In current versions of GoLand (i'm running 2024.2.3), are there any settings to do this mapping manually ? Or any suggestion that i can do/make on my local machine ? 

0
2 comments
Hi Matthew,

Does it help if you enable the 'Build on remote target' option in your Go Build configuration?
0

Please sign in to leave a comment.