有什么方法可以使用VS Code调试在vagrant中运行的Django应用?

时间:2018-07-12 06:58:25

标签: django debugging visual-studio-code vagrant remote-debugging

我一直在尝试使用VS Code调试在其devstack中运行的Open edX实例,但调试器一直在给我错误。

Debug adapter process has terminated unexpectedly

这是我的launch.json

{
  "name": "Python: Open edX",
  "type": "python",
  "request": "attach",
  "localRoot": "${workspaceFolder}",
  "remoteRoot": "/edx/app/edxapp/edx-platform/manage.py",
  "port": 2222,
  "host": "localhost",
  "secret": "my_secret",
},

还将ptvsd插入了manage.py

的源代码中
import ptvsd

ptvsd.enable_attach("my_secret", address = ('192.168.33.10', 8005))

ptvsd.wait_for_attach()

0 个答案:

没有答案