You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When debugging the app, port forwarding in VS Code is unstable and in some situations it prevents the user from being able to access the application in their browser.
To Reproduce
Steps to reproduce the behavior:
In VS Code, close all ports, reopen the folder locally, and rebuild the container to start with a fresh dev container, notice the two forwarded ports
Run the VS Code debugger using the Django: Benefits Client launcher configuration, notice that a third port was added
In your web browser, navigate to the app running on localhost:DJANGO_LOCAL_PORT where DJANGO_LOCAL_PORT is set in your .env file.
Select a Transit Agency and submit the form Choose this benefit with Agency cardholder selected. Notice that a new port has been added
The web browser hangs
Stop the debugger
Restart the debugger. Notice that the forwarded addess has changed, the browser is still hanging
Expected behavior
The web browser should still be able to reach the application on localhost:DJANGO_LOCAL_PORT
Screenshots
Similar behavior occurs with VS Code running on Linux although the Forwarded Address and Running Process columns look slightly different from VS Code running in macOS.
When debugging the app, port forwarding in VS Code is unstable and in some situations it prevents the user from being able to access the application in their browser.
To Reproduce
Steps to reproduce the behavior:
Django: Benefits Client
launcher configuration, notice that a third port was addedlocalhost:DJANGO_LOCAL_PORT
whereDJANGO_LOCAL_PORT
is set in your.env
file.Choose this benefit
withAgency cardholder
selected. Notice that a new port has been addedExpected behavior
The web browser should still be able to reach the application on
localhost:DJANGO_LOCAL_PORT
Screenshots
Similar behavior occurs with VS Code running on Linux although the
Forwarded Address
andRunning Process
columns look slightly different from VS Code running in macOS.Desktop
Additional context
A possible solution is to add
"otherPortsAttributes": { "onAutoForward": "ignore" }
todevcontainer.json
as suggested by https://stackoverflow.com/a/74177846. A description of theotherPortsAttributes
property is provided at https://containers.dev/implementors/json_reference/#general-properties and the options that the property can take are shown at https://containers.dev/implementors/json_reference/#port-attributes.While adding
"portsAttributes": { "onAutoForward": "ignore" }
could also be a solution, adding this did not make any difference in contrast to adding"otherPortsAttributes": { "onAutoForward": "ignore" }
.The text was updated successfully, but these errors were encountered: