나는 현재 플라스크 응용 프로그램에서는 파일의 구조는 다음과 같습니다.
C:\Users\kmelton\Python\Flask\BGSCS-API-dev\InterjectApi\server.py
그리고 폴더가 현재 열려 있으로 작업 공간에 대 코드 BGSCS-API-dev 폴더에 있습니다.
내 실행합니다.json 는 현재 다음과 같다:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "server.py",
"FLASK_ENV": "development"
},
"args": [
"run",
"--no-debugger"
],
"jinja": true
}
]
}
과에 따라 모든 디버깅을 시도,나는 오류가 발생합니다.
* Serving Flask app 'server.py' (lazy loading)
* Environment: development
* Debug mode: on
Usage: python -m flask run [OPTIONS]
Try 'python -m flask run --help' for help.
Error: Could not import 'server'.
내가 알고 있는 것은 아마도 내가 필요로 추가해 나 실행합니다.json 파일을 파일의 경로 적절하지만,일을 내가 노력하지 않은 나를 위해 일했습니다. 감사