Cloud Debugger is deprecated and will be shutdown May 31, 2023.
快速入门:检查 Cloud Source Repositories 中存储的代码
检查 Cloud Source Repositories 中存储的代码
本页介绍了如何使用 Cloud Debugger 检查存储在 Cloud Source Repositories 中并部署到 App Engine 的代码。使用 Debugger,您可以实时检查应用的状态,既不需要停止应用,也不会拖慢应用的运行速度。
部署应用
在终端窗口中,转到代码库的根目录:
cd hello-world
部署应用
gcloud app deploy --version=v1
打开您的应用:
gcloud app browse
浏览器会显示消息 Hello, World!
。
查看已部署的源代码
部署应用后,在 Google Cloud Console 中查看其来源。
在 GCP Console 中,转到 Stackdriver Debug 页面。
转到 Stackdriver Debug 页面
选择您的 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-01 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":"其他"
}]