Having trouble attaching a debugger session to remote python docker container? #33280
-
| 
         I had a bit of trouble getting the new debugger to attach to a remote docker container. Zed nicely grabbed details found in vscode launch.json script, however constantly threw Connection Timeout error messages when attempting to connect. It appears as though zed needs to explicitly set tcp_connection details in order to correctly attach 🙏 Here is my working debug.json if anyone is running into this same issue. [
  {
    "request": "attach",
    "adapter": "Debugpy",
    "label": "Attach Python",
    "tcp_connection": { "host": "127.0.0.1", "port": 5678 },
    "cwd": "$ZED_WORKTREE_ROOT",
    "port": 5678,
    "log": true,
    "pathMappings": [
      {
        "localRoot": "${ZED_WORKTREE_ROOT}",
        "remoteRoot": "/my/container/path/"
      }
    ]
  }
]
I figured I'd share this in the event anyone else is having trouble giving the new debugger a test drive.  | 
  
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
| 
         I have been trying to make this work, but as soon as Zed connects to Debugpy in my Docker container Django exits. It looks like Zed is sending Debugpy the kill signal as soon as it establishes a connection.  | 
  
Beta Was this translation helpful? Give feedback.
-
| 
         Thank you for finding a solution to this! I'm closing this discussion because #41690 fixes the bug on Zeds end.  | 
  
Beta Was this translation helpful? Give feedback.
Thank you for finding a solution to this! I'm closing this discussion because #41690 fixes the bug on Zeds end.