GoogleCloudPlatform / cloud-code-vscode

Cloud Code for Visual Studio Code: Issues, Documentation and more
Other
420 stars 112 forks source link

Cloud Run Emulator Debugging skips breakpoints #896

Open thoughtfuldata opened 7 months ago

thoughtfuldata commented 7 months ago

Environment:

Version: 1.88.1 (user setup) Commit: e170252f762678dec6ca2cc69aba1570769a5d39 Date: 2024-04-10T17:41:02.734Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Windows_NT x64 10.0.22631

Version information

Cloud Code Extension version: v2.8.1

Cloud SDK: 467.0.0]

Skaffold: 2.9.0

Kubectl: 1.26.13

Description: Debugging skips all breakpoints

Repro step:

When trying to "Debug on Cloud Run Emulator"

            "name": "Cloud Run: Run/Debug Locally",
            "type": "cloudcode.cloudrun",
            "request": "launch",
            "build": {
                "docker": {
                    "path": "Dockerfile",
                    "target": "prod",
                    "buildArgs": {}
                }
            },
            "image": "IMAGE_NAME",
            "service": {
                "name": "IMAGE_NAME",
                "containerPort": 8080,
                "resources": {
                    "limits": {
                        "memory": "256Mi"
                    }
                }
            },
            "target": {
                "minikube": {}
            },
            "watch": true
        }

based on this #445 I have even added python: time.sleep(40) and still doesn't work.

I do get this message:

 Debugger warning: It seems that frozen modules are being used, which may
make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
to python to disable frozen modules.
Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.

but not sure if this means anything. I tried to add it in a couple of places and work with Sourcemapfile but still didn't fix it

sripasg commented 7 months ago

Thank you for raising this issue. We will attempt to reproduce this internally and get back with any investigation results.

glouischandra commented 3 weeks ago

@thoughtfuldata have you tried adding that env variable in the Cloud Run launch.json's env config?