0

I have a legacy system that uses Python 2.7. The application gets built using Buildout and I run the application as bin/django runserver 0.0.0.0:8000 oppose to python manage.py runserver 0.0.0.0:8000. Is it possible to debug something like this? I have referred to the following post: How to debug Python 2.7 code with VS Code? But I can't seem to get a working .vscode/launch.json configuration to work. I am running the application in a Docker container which I attach my vscode instance to. I am not trying to to debug the running web server, but the background tasks that the webserver performs using celery. Example: bin/django test_task TaskName --start

I appreciate all of those who reply in advance, thanks!

KED
  • 183
  • 1
  • 6
  • VSC has dropped support for Python 2.7, you have to find a different dev environment, maybe Komodo – rioV8 May 16 '23 at 17:00

1 Answers1

0

The python extension in vscode provides support for python 3.7 and above.

You need to downgrade the Python extension or even the vscode version until it is suitable for python 2.7 debugging,

enter image description here

related links:

JialeDu
  • 6,021
  • 2
  • 5
  • 24