Cloud Debugger is deprecated and will be shutdown May 31, 2023.
クイックスタート: Cloud Source Repositories に保存されているコードを検査する
Cloud Source Repositories に保存されているコードを検査する
このページでは、Cloud デバッガを使用して、Cloud Source Repositories に保存され、App Engine にデプロイされたコードを検査する方法について説明します。デバッガを使用すると、アプリを停止することなく、アプリの状態をリアルタイムで検査できます。また、アプリの速度を低下させることもありません。
アプリをデプロイする
ターミナル ウィンドウで、リポジトリのルートに移動します。
cd hello-world
アプリをデプロイします。
gcloud app deploy --version=v1
アプリを開きます。
gcloud app browse
ブラウザに「Hello, World!
」というメッセージが表示されます。
デプロイされたソースを表示する
アプリをデプロイしたら、Google Cloud Console でソースを表示します。
GCP Console で、[Stackdriver Debug] ページに移動します。
[Stackdriver デバッグ] ページに移動
Google Cloud プロジェクトを選択します。
ツールバーで [デフォルト] を選択します。
この設定では、デバッグ中のアプリのサービスまたはバージョンが表示されます。
[デプロイされたファイル] を選択します。
デプロイした Python アプリのソースファイルがパネルに表示されます。デプロイされたファイルのリストで、main.py
をクリックし、コンテンツを表示します。
この時点で Debugger を使用してスナップショットを取得します。あるいは、ログポイントを設定します。
クリーンアップ
このページで使用したリソースについて、Google Cloud アカウントに課金されないようにするには、次の手順を行います。
GCP Console で、Cloud Source Repositories の [すべてのリポジトリ] ページを開きます。
Cloud Source Repositories を開く
削除するリポジトリにカーソルを合わせ、[設定] settingsをクリックします。
[全般設定] ページが開きます。
[このリポジトリを削除] delete をクリックします。
[リポジトリの削除] ダイアログが開きます。
削除するリポジトリの名前を入力します。
[削除] をクリックします。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-06-15 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"わかりにくい"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"情報またはサンプルコードが不正確"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"必要な情報 / サンプルがない"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]