When I try to start Go Application
in debug mode, Gogland takes a lot of time to start it. This can take several minutes and happens every time it is started, even without code changes.
1> Mark Robinson..:
The problem is that Gogland forces a rebuild on every debug call. So if you have a lot of dependencies, that will Very slow.
The solution is to go into Settings > Build, Execution, Deployment > Debugger
and disable Rebuild transitive packages
. This will make debug startup 20 times faster (90 seconds vs. 5 seconds).
You should create a Go Application
target marked “Complete Rebuild” and set the Go Tool Arguments to -i -a
. This will force a debug rebuild and store intermediate products to speed future builds.
However, this means that your caching and optimization, and therefore not the correct debugging information, can use the package in the debugger, which means it will affect your debugging experience. If you have any issues with the debugger, you need to first Run -a
and see if the problem occurs again.