Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug django web application using specific port & localhost in visual studio code?

I want to debug django web application using visual code for that I have found solution that I have to edit launch.json for debugging django web application.

launch.json

"name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}\\web_app_test\\manage.py",
            "port": "8005",
            "address" : "192.168.1.195",

I have implemented above code in launch.json but still I am not able to start my web application on above port it automatically running on default port & localhost.

like image 369
Moon Avatar asked Dec 18 '22 15:12

Moon


1 Answers

Yes I am able to debug it finally using below code after lots of search on google.

we have to define them into args using ipaddress & port.

"args": [
                "runserver",
                "--noreload",
                "192.168.1.195:8005",
            ],
like image 115
Moon Avatar answered Dec 28 '22 11:12

Moon