Given the containerized nature of the analyzer, and its dependency on external components, many times it will be convenient to debug its code running inside a container. This can be achieved by executing the main command with the Go Delve debugger.
For comprehensive debugging information, see the Development Setup - Debugging section which covers debugging the analyzer, providers, and LSP communication.
debug.Dockerfile makes it possible to do this, and also to connect from an external IDE, like GoLand or VSCode.
You can follow these instructions to debug the analyzer from the GoLand IDE.
Follow this blog post to debug from VSCode. The Dockerfile creation steps can be skipped.