我在VS Code中具有以下task.json文件:
{
"version": "0.1.0",
"command": "python",
"isShellCommand": true,
"showOutput": "always",
"args": [
"$PATH/dev_appserver.py",
"--python_startup_script=$PATH/pydev_startup.py",
"--automatic_restart=yes",
"-A=my_project_name",
"--max_module_instances=1",
"--port=5001",
"--host=localhost",
"${workspaceRoot}/app.yaml"
]
}
当我运行build时,它会触发除python启动脚本以外的所有内容,我在控制台中看不到任何错误,而当我直接运行该脚本时,它就可以了,只是打印而已,就像这样:
# import ptvsd
import sys
import os
print("Running my awesome startup script!")
# Assuming that pdvsd is located in the working folder
# sys.path.append(os.getcwd())
# Fee free to change the secret and port number
# ptvsd.enable_attach(address=('0.0.0.0', 3005))
# The debug server has started and you can now use VS Code to attach to the application for debugging
print("Google App Engine has started, ready to attach the debugger")
任何提示我错了吗?谢谢!