Troubleshooting by debugging, tracing, and profiling your code
Our code can have issues of different types. For example, it may just not run as expected due to a bug, or it may be running apparently fine, but have some operations lasting much longer than initially expected. In situations like these, we will need to dig deep into our code, follow the execution flow step by step, and ultimately identify what is wrong and put together a fix.
While this can be easy to do locally, it may become quite complicated in cloud environments, especially with technologies such as clusters, where observability is limited, and you usually need to resort to remote debugging techniques if you want to have some visibility. Fortunately, Google Cloud provides a set of tools that makes these tasks much easier, helping us avoid tedious tasks such as port forwarding, even if our workload is running on a different cloud provider.
With Cloud Code, for example, you can debug remote containers in the same...