运行PyCharm 4.5.3构建#141.1899专业版并获得许可。我使用profiler命令运行Flask应用程序,使用类似于以下的配置:
python app.py
看起来像:
def create_app():
app = Flask(__name__, static_folder='static')
app.register_blueprint(
consumer_v1.bp,
url_prefix='/consumer/v1')
return app
app = create_app()
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=5001)
当我转到“运行 - >个人资料应用”时,我在控制台上看到以下内容:
/Users/james/.virtualenvs/trustmile-api/bin/python /Applications/PyCharm.app/Contents/helpers/profiler/run_profiler.py 127.0.0.1 49537 /Users/james/Documents/workspace/trustmile-backend/trustmile/api_stubs/api_stubs/__init__.py
Starting cProfile profiler
2015-09-01 07:00:25,717 INFO [werkzeug][MainThread] * Running on http://0.0.0.0:5001/ (Press CTRL+C to quit)
2015-09-01 07:00:25,723 INFO [werkzeug][MainThread] * Restarting with stat
2015-09-01 07:00:32,801 INFO [werkzeug][Thread-1] 127.0.0.1 - - [01/Sep/2015 07:00:32] "POST /consumer/v1/account/password HTTP/1.1" 403 -
Snapshot saved to /Users/XXXX/Library/Caches/PyCharm40/snapshots/trustmile-backend5.pstat
Process finished with exit code 0
然而,UI中没有显示任何内容,如下所示。
非常感谢任何帮助。