我在使用vscode调试我的appengine代码时遇到问题。 我按照文档中的所有说明进行操作,但运气不好,无法调试器工作。
我将task.json设置为
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "echo Hello"
},
{
"label": "Launch Google App Engine",
"command": "python",
"type": "shell",
"args": [
"C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py",
"--python_startup_script=${workspaceFolder}/pydev_startup.py",
"--automatic_restart=no",
"--max_module_instances=default:1",
"${workspaceFolder}/app.yaml"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Launch.json是
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"port": 3000,
"host": "localhost",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
},
应用程序运行正常。我还可以将调试器连接到端口3000,但是当我在代码中放置断点时,我无法使调试器达到断点。