Debugging
You can use Cloud Code to debug your application:
- Click Cloud Code in the status bar, and select Debug on Kubernetes:

Figure 3.19 – Selecting the Debug on Kubernetes option
Cloud Code deploys your app in debug mode to your GKE cluster, remembering the choices you made before.
- In the
HelloController.java
file, set a breakpoint at line 16 by clicking the blank space to the left of the line number.Line 16 is the line that has the return statement you updated previously. A red indicator shows that the breakpoint is set.

Figure 3.20 – A Java file with a breakpoint
- Go back to the Cloud Code section, and in the
Port Forward URLs
folder, click on service | java-scdongcp-external.
Important note
The debugger stops the process at the breakpoint so you can investigate the variables and state of the application:
- Show the DEBUG view.

Figure...