Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong debuggerPath is used for dotnet #397

Closed
616b2f opened this issue Mar 10, 2021 · 2 comments
Closed

wrong debuggerPath is used for dotnet #397

616b2f opened this issue Mar 10, 2021 · 2 comments

Comments

@616b2f
Copy link

616b2f commented Mar 10, 2021

Environment:
(Hint: "Report Extension Issue on Github" command will fill these out for you.)

Version information

Cloud Code Extension version: v1.9.0

VSCode version: 1.53.2

OS: Ubuntu 20.04

Cloud SDK:

Skaffold: 1.20.0

Kubectl: 1.20.4

Description:

Cloud Code Extension uses debuggerPath: "/vsdbg/vsdbg" but the init container (see https://github.com/GoogleContainerTools/container-debug-support) that are used in skaffold installs it in "/dbg/netcore/vsdbg". I don't found any possibility to change debuggerPath in vscode config for "cloudcode.kubernetes" type.

Replacing it in the extensions.js does the trick and it works out of the box (ps command still needs to be installed in the application container, there is an open issue for that dotnet/vscode-csharp#4096)

sed -i 's#"/vsdbg/vsdbg"#"/dbg/netcore/vsdbg"#g' ~/.vscode/extensions/googlecloudtools.cloudcode-1.9.0/dist/extension.js

Repro step: trying to debug with following config in launch.json in vscode:

        {
            "name": "Kubernetes: Run/Debug - dev",
            "type": "cloudcode.kubernetes",
            "request": "launch",
            "skaffoldConfig": "${workspaceFolder}/skaffold.yaml",
            "imageRegistry": "my.examplecr.io",
            "profile": "dev",
            "watch": true,
            "cleanUp": true,
            "portForward": true,
            "debug": [
                {
                    "image": "my.examplecr.io/testimage",
                    "sourceFileMap": {
                        "${workspaceFolder}": "/app"
                    }
                }
            ]
        }

EDIT: updated sed command, it had an error in it.

@quoctruong
Copy link
Contributor

@616b2f Thank you for the report. I think our sample is currently using the vsdbg path and that is why there is this disconnect. We can expose this path option in the debug node. WDYT?

@616b2f
Copy link
Author

616b2f commented Mar 10, 2021

@quoctruong Thank you for the fast reply. Exactly, it looks like this was the first solution and then skaffold introduced a new way using initial containers, but the samples didn't changed since then. I think this would be great, so the user could decide which way he want to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants