GoogleCloudPlatform / GoogleCloudPlatform/cloud-code-intellij

Allow Controlling Port Forwarding

Open
#3,110 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
325
Forks
64
PR merge metrics
No merged PRs in 30d

Description

I have a spring boot java service using cloud code. I want to debug the server start sequence, but there is no way to do it.

**Scenario 1**
1. Enable deployment checks on the cloud code run configuration
2. Set the JVM arguments for debugging to not wait for the debug connection
3. The port forwarding will be established _after_ the server start sequence

**Scenario 2**
1. Disable deployment checks on the cloud code run configuration
2. Set the JVM arguments for debugging to wait for the debug connection
3. The kubectl port forwarding will be attempted _before_ the service is ready, and it will fail
4. The server will start without any debugging capability

At present, how can I debug startup code in a server that occurs before readiness/liveness probes in cloud code?

If there was a button, or a delay, that I could configure for port forwarding to kick in, this would be solved. I could add `suspend=y` for the java debug agent, and have my port forwarding happen after X seconds.

### Expected Behavior
I can control **when** port forwarding URLs occurs when using "Develop on Kubernetes".

### Actual Behavior
I can not control **when** port forwarding URLs occurs when using "Develop on Kubernetes".

### Additional Information
- IDE type: IntelliJ IDEA
- IDE version: 2022.2.3 (Ultimate Edition) Build #IU-222.4345.14, built on October 4, 2022
- Cloud Code version (Settings > Plugins > Cloud Code): 22.10.1-222
- Cloud SDK (Settings > Cloud Code > Cloud SDK)
- Are you allowing the plugin to manage the Cloud SDK: No
- Version of the Cloud SDK: 402.0.0
- Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): v1.39.2
- Operating System: MacOS 12.6

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.