microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.22k stars 517 forks source link

The webpage keeps loading forever after debugging Django project more than 3 times #2191

Closed v-ruizh closed 4 years ago

v-ruizh commented 4 years ago

OS: Win 10 Build Version: 20200723.3

Repro Steps:

  1. Open a Python Django project and add Docker support for it in VS Code insider.
  2. Debug this project more than 3 times.

Expect: The webpage opens successfully every debugging.

Actual: The webpage keeps loading forever after debugging 3 times. image

More Info:

  1. This issue does not reproduce for Flask project.
  2. Please debug again to reproduce this issue if you can't reproduce it during debugging.
bwateratmsft commented 4 years ago

I've seen this happen but every time it was VSCode silently hitting a breakpoint or halting on an exception.

bwateratmsft commented 4 years ago

I haven't been able to repro today though as mentioned I've seen this in the past. @v-ruizh, if you hit this issue again can you check VSCode to see if it is stopped at an exception or breakpoint, etc.? If so, see if pressing continue (F5) in VSCode causes the web page to be loaded.

v-ruizh commented 4 years ago

@bwateratmsft I can also reproduce this issue. No any breakpoint is set and there is no exception stopping the debugging. I have a video to record this issue, have sent you by Teams.

dbreshears commented 4 years ago

@v-ruizh . I am also unable to reproduce this on VSCode Insiders or VSCode. Tried debugging 5 or 6 times each.

v-ruizh commented 4 years ago

This issue does not reproduce on the machine with Docker Desktop + WSL2 enabled. It only reproduces without WSL2, it's an unstable issue. I verified this issue on 2 machines without WSL2, sometimes it takes more than 3 mins to load the web page. Maybe it does not keep loading forever, it needs to take more time to load it. The longest time I wait for during my testing is more than 20 mins, can't load the web page within 20 mins. Need to debugging more times to reproduce this issue.

bwateratmsft commented 4 years ago

I was not able to repro with WSL2 turned off. One thing to validate--Docker usually picks a new port every time, so if you refresh on an existing tab, it may show that loading-forever behavior--there's nothing listening on the other end. We open a new tab each time we debug; that tab should always have the latest port and work. Any others may not.

bwateratmsft commented 4 years ago

We'll close this issue for now unless we hear from customers. I have seen something like this occur on multiple platforms--debugging "starts" but never attaches and continues, and the site isn't running. Since it's occurred on multiple platforms I suspect it is a VSCode issue. In any case, we cannot reliably reproduce this so we'll close for now.