LoginSignup
1

More than 5 years have passed since last update.

Pycharmでpython27 on Google App Engineのデバッグをする時の設定

Posted at

準備するもの

  • Community Editionではないpycharm
  • Google Cloud SDK
  • pythonコマンドでpython 2.7.12が帰ってくる環境
  • hello world用のサンプルソース

プロジェクトの作成

image.png

「Google App Engin」の設定を使ってもいいんですが、入力しないといけない項目が多いので:pensive:

SDKのディレクトリの設定

image.png

「Preferences」からGoogle App Engineの項目を開いて、あらかじめインストールしておいてあるSDKのパスを設定してあげます。

Debugの設定

image.png

こんな感じで、「Google App Engine」の設定を登録してあげます。

「venv」を使用している場合、Working directoryがプロジェクト直下ではなくなってしまい、app.yamlがない!と言われてしまいますので、明示的に指定してあげる必要があります。

Debugの実行

image.png

ブレークポイントを設定したい行を選択し、虫:spider:のボタンを押するとデバッグが有効になるので、localhost:8080にアクセスしてみましょう。

image.png

無事、デバッグが止まるようになりました!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1