vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

The remote debugging auto-disconnects immediately on Mac

Open v-xinda opened this issue 3 years ago • 6 comments

OS: M1(Pro) Build Version: 20220726.5

Repro Steps:

  1. Open a python project in VS Code -> Add docker files to it.
  2. Right click .debug.yml file -> Compose Up.
  3. Open the launch.json file -> Add a new "Python Remote Attach" configuration.
  4. Navigate to "Run and Debug" view -> Select "Python: Remote Attach" -> F5.
  5. Check whether succeeds to remote debug the python project.

Expect: Succeed to remote debug the python project.

Actual: The remote debugging auto-disconnects immediately.

More Info: This issue doesn't reproduce on Windows and Linux.

v-xinda avatar Jul 27 '22 11:07 v-xinda

This might be an M1-only issue. @v-xinda, can you try this on an Intel Mac if possible?

bwateratmsft avatar Jul 27 '22 14:07 bwateratmsft

I was able to test on my Intel Mac, and the issue did not reproduce. I'll see if I can test on M1.

bwateratmsft avatar Jul 27 '22 16:07 bwateratmsft

I was able to make this Flask-based tutorial work on my M1 Mac, as well as another FastApi-based sample (with a base image quirk that had a different symptom but was ultimately successful).

@v-xinda If you still repro this issue, it'd be good to attach the Python project source as there's so many different flavors, it makes reproduction difficult.

philliphoff avatar Jul 27 '22 22:07 philliphoff

@philliphoff @bwateratmsft Python project source as below: flask_project.zip

v-xinda avatar Jul 28 '22 02:07 v-xinda

@v-xinda I was able to successfully attach and debug using that sample project on my M1 Mac. What port were you choosing for running the app/container? If 5000 (which tends to be the default for Flask), you could end up colliding with an Apple service running on the machine (AirPlay, which uses the same port).

philliphoff avatar Jul 29 '22 18:07 philliphoff

@philliphoff The default port is 5002, but this issue also reproduces if I change the port to 3000 when remote debugging the flask_project project.

v-xinda avatar Aug 01 '22 06:08 v-xinda

We'll close this for now and see if any customers reproduce it.

bwateratmsft avatar Dec 14 '22 19:12 bwateratmsft