WebFreak001 / code-debug

Native debugging for VSCode
The Unlicense
409 stars 115 forks source link

Connection thru docker like ssh #155

Closed bruegth closed 1 year ago

bruegth commented 6 years ago

Please add a option to connect via docker client: e.g.: docker --tls -H docker_daemon_hostname:2376 exec -i name_of_docker_container lldb-3.9 -O "settings set target.exec-search-paths ...

GitMensch commented 1 year ago

What was your solution?

bruegth commented 1 year ago

For Windows and Docker daemon with https endpoint

"version": "0.2.0",
"configurations": [
    {
        "name": "Attach to process on ServerX",
        "type": "coreclr",
        "request": "attach",
        "processId": "1",
        "pipeTransport": {
            "pipeCwd": "${workspaceRoot}",
            "pipeProgram": "\"C:\\Program Files\\Docker\\Docker\\resources\\bin\\Docker.exe\"",
            "pipeArgs": ["--tls", "--tlscacert=\"${env:AppData}\\Docker\\certs.d\\ca.pem\"", "--tlscert=\"${env:AppData}\\Docker\\certs.d\\cert.pem\"", "--tlskey=\"${env:AppData}\\Docker\\certs.d\\key.pem\"", "-H", "ServerX:2376", "exec", "-i", "container_name"],
            "debuggerPath": "/vsdbg/vsdbg",
            "quoteArgs": false
        }
    },
GitMensch commented 1 year ago

I see. That's another debugging extension...

For this extension an ssh setup could be used (but I've learned you often don't have sshd on the docker side) or "piping", see #182.