Reputation: 1
I've got a VM instance up and running on Google Compute Engine, and I'm using the Cloud Shell Editor on GCP for my application development.
I've hit a bit of a snag. While I can SSH into my VM and edit my code directly through the Cloud Shell Editor, I've been having trouble properly configuring a launch.json file to debug my application.
Right now, I'm resorting to printing a ton of stuff just to see what's going on, but it would be much more efficient to use the debug tool.
Does anyone have any ideas on how I can achieve this?
Specifically, I'm looking to use the Cloud Shell Editor to connect to my VM and debug the application that's currently running on the VM.
Thanks in advance for any help or suggestions!
I expect to create a launch.json file that will run my code through the VM instance, because now when I try to use it, it runs in another terminal that is not in the VM
Upvotes: 0
Views: 175
Reputation: 1
It sounds like the debug functionality of the Cloud Editor should help you:
https://youtu.be/4Mo6pdLqlBE?feature=shared&t=165
Alternatively have you read the official documentation on how to debug a Cloud Run service and Debugging With Skaffold:
https://cloud.google.com/code/docs/shell/debug-service
https://skaffold.dev/docs/workflows/debug/
Upvotes: 0