GoogleCloudPlatform / GoogleCloudPlatform/cloud-code-intellij

Breakpoints not hit in debug mode on intellij

Open
#3,122 9 comments 0 reactions 0 assignees View on GitHub
area/skaffold-debug
Dominant language
No language data
Stars
325
Forks
64
PR merge metrics
No merged PRs in 30d

Description

(Please ensure you are running the latest version of Cloud Cloud IntelliJ with _Help > Check for Updates_.)

(screenshots are often helpful)

### Expected Behavior

Normal breakpoint behavior when running debug mode, like pausing at breakpoints.

### Actual Behavior

Breakpoints skipped/not hit

### Additional Information

Trying to run the guestbook application. I can see the output in the terminal indicating there might be a problem connecting with the debugger. Everything else in the project seems to work fine when running outside debug mode.

```
[backend] 2023-01-08T04:27:01Z error layer=rpc writing response:write tcp 127.0.0.1:56268->127.0.0.1:41584: use of closed network connection
[frontend] 2023-01-08T04:27:01Z error layer=rpc writing response:write tcp 127.0.0.1:56268->127.0.0.1:41570: use of closed network connection
```

I am able to hit breakpoints when running the project through VS Code.

- IDE type (e.g. IntelliJ, Pycharm): Intellij
- IDE version: 2022.2.5
- Cloud Code version (Settings > Plugins > Cloud Code): 22-12-2.222
- Cloud SDK (Settings > Cloud Code > Cloud SDK)
- Are you allowing the plugin to manage the Cloud SDK: Yes
- Version of the Cloud SDK: 412.0.0
- Skaffold version (If you are using Kubernetes features; Settings > Cloud Code > Kubernetes): skaffold v2.0.4
- Operating System: 13.1

_Feel free to deviate from this template as needed, especially if you are submitting a feature request._

Here is the full log if it's helpful:

```
Validating Kubernetes dependencies...
Validating Docker settings...
Validating image repository settings...

Status of minikube api-server is STOPPED

minikube may take several minutes to start up...

Starting minikube

/Users/scottadmin/Library/Application Support/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/bin/minikube start --wait true --vm-driver docker --interactive false --delete-on-failure --user cloud-code-intellij
* minikube v1.28.0 on Darwin 13.1 (arm64)
- MINIKUBE_WANTUPDATENOTIFICATION=false
* Using the docker driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Restarting existing docker container for "minikube" ...
* Preparing Kubernetes v1.25.3 on Docker 20.10.20 ...
* Verifying Kubernetes components...
- Using image docker.io/kubernetesui/dashboard:v2.7.0
- Using image gcr.io/k8s-minikube/storage-provisioner:v5
- Using image docker.io/kubernetesui/metrics-scraper:v1.0.8
* Some dashboard features require the metrics-server addon. To enable all features please run:

minikube addons enable metrics-server

* Enabled addons: storage-provisioner, default-storageclass, dashboard

! /Users/scottadmin/Library/Application Support/cloud-code/bin/versions/0031dbdda2711c2792ffe249194dabbb8599cded7f7b28a0d9085f5455359ec5/kubectl is version 1.21.0, which may have incompatibilities with Kubernetes 1.25.3.
- Want kubectl v1.25.3? Try 'minikube kubectl -- get pods -A'
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default

minikube started successfully.
Enabling GCP auth addon...

GCP auth addon successfully enabled

/Users/scottadmin/Library/Application Support/cloud-code/bin/versions/0031dbdda2711c2792ffe249194dabbb8599cded7f7b28a0d9085f5455359ec5/skaffold debug --filename skaffold.yaml --label ide=cloudcodeintellij --rpc-port 50051 --port-forward=true --wait-for-deletions-max=2m0s --status-check=true --verbosity warn
Listing files to watch...
- go-guestbook-frontend
- go-guestbook-backend
Generating tags...
- go-guestbook-frontend -> go-guestbook-frontend:latest
- go-guestbook-backend -> go-guestbook-backend:latest
Some taggers failed. Rerun with -vdebug for errors.
Checking cache...
- go-guestbook-frontend: Not found. Building
- go-guestbook-backend: Not found. Building
Starting build...
Found [minikube] context, using local docker daemon.
Found [minikube] context, using local docker daemon.
Building [go-guestbook-backend]...
Target platforms: [linux/arm64]
Build [go-guestbook-backend] succeeded
Building [go-guestbook-frontend]...
Target platforms: [linux/arm64]
Build [go-guestbook-frontend] succeeded
Tags used in deployment:
- go-guestbook-frontend -> go-guestbook-frontend:25a4170b96d9fabb0aef7a8f3edb57aeba42f8536198a6c983cadfe4e004c9c2
- go-guestbook-backend -> go-guestbook-backend:0134a5cd0230a4a6b08b72f70e14c46b3cfaf1fcb5c6c538cf3424fe32b44acd
Starting deploy...
- deployment.apps/go-guestbook-frontend created
- service/go-guestbook-frontend created
- deployment.apps/go-guestbook-backend created
- service/go-guestbook-backend created
- deployment.apps/go-guestbook-mongodb created
- service/go-guestbook-mongodb created
Waiting for deployments to stabilize...
- deployment/go-guestbook-mongodb is ready. [2/3 deployment(s) still pending]
- pod/go-guestbook-frontend-8448b8bf8-c4nv7: waiting for init container install-go-debug-support to start
- pod/go-guestbook-backend-8dcb95fcc-wn9n4: waiting for init container init-db-ready to start
- pod/go-guestbook-frontend-8448b8bf8-c4nv7: running.
- deployment/go-guestbook-frontend is ready. [1/3 deployment(s) still pending]
- deployment/go-guestbook-backend:
- pod/go-guestbook-backend-8dcb95fcc-wn9n4: running.
- deployment/go-guestbook-backend is ready.
Deployments stabilized in 11.136 seconds
Port forwarding service/go-guestbook-frontend in namespace default, remote port 80 -> http://127.0.0.1:4503
Port forwarding service/go-guestbook-mongodb in namespace default, remote port 27017 -> http://127.0.0.1:27017
Port forwarding service/go-guestbook-backend in namespace default, remote port 8080 -> http://127.0.0.1:8080
Forwarding container go-guestbook-frontend-8448b8bf8-c4nv7/frontend to local port 56269.
Forwarding container go-guestbook-frontend-8448b8bf8-c4nv7/frontend to local port 56269.
Press Ctrl+C to exit
Not watching for changes...
[frontend] API server listening at: [::]:56268
[backend] API server listening at: [::]:56268
[init-db-ready] Waiting for mongodb at go-guestbook-mongodb:27017 to go live before the BE...
[install-go-debug-support] Installing runtime debugging support files in /dbg
[backend] 2023-01-08T04:26:50Z warning layer=rpc Listening for remote connections (connections are not authenticated nor encrypted)
[install-go-debug-support] Installation complete
[backend] 2023/01/08 04:26:51 backend server listening on port 8080
[frontend] 2023-01-08T04:26:49Z warning layer=rpc Listening for remote connections (connections are not authenticated nor encrypted)
[frontend] 2023/01/08 04:26:50 frontend server listening on port 8080
[install-go-debug-support] Installing runtime debugging support files in /dbg
[install-go-debug-support] Installation complete
Port forwarding pod/go-guestbook-backend-8dcb95fcc-wn9n4 in namespace default, remote port 56268 -> http://127.0.0.1:56268
Port forwarding pod/go-guestbook-frontend-8448b8bf8-c4nv7 in namespace default, remote port 56268 -> http://127.0.0.1:56269
[backend] 2023-01-08T04:27:01Z error layer=rpc writing response:write tcp 127.0.0.1:56268->127.0.0.1:41584: use of closed network connection
[frontend] 2023-01-08T04:27:01Z error layer=rpc writing response:write tcp 127.0.0.1:56268->127.0.0.1:41570: use of closed network connection

Cleaning up...
- deployment.apps "go-guestbook-backend" deleted
Disabling GCP auth addon...

- service "go-guestbook-backend" deleted
- deployment.apps "go-guestbook-mongodb" deleted
- service "go-guestbook-mongodb" deleted
- deployment.apps "go-guestbook-frontend" deleted
- service "go-guestbook-frontend" deleted

GCP auth addon successfully disabled

Stopping minikube

/Users/scottadmin/Library/Application Support/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/bin/minikube stop --user cloud-code-intellij
* Stopping node "minikube" ...
* Powering off "minikube" via SSH ...
* 1 node stopped.

minikube stopped successfully.

```

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.