Open the code editor from the Cloud Shell toolbar. You’ll also notice that we’ve introduced the ability to upload and download files from your Cloud Shell home directory.
Save your source code in Cloud Source Repositories
Switch to the tab with the open shell pane and go to your app’s directory: cd helloworldapp
Initialize git and your repo. The first two steps aren't necessary if you've done them before: git config --global user.email "you@example.com" git config --global user.name "Your Name" git init git add . -A git commit -m "Initial commit"
Authorize Git to access GCP: git config credential.helper gcloud.sh
Add the repository as a remote named ‘google’ to your local Git repository, first replacing [PROJECT_ID] with the name of your Cloud project:
git remote add google https://source.developers.google.com/p/[PROJECT_ID]/r/default
git push google master
Deploy to App Engine
From the ~/helloworldapp directory, type: gcloud app deploy app.yaml
Type ‘Y’ to confirm
Visit your newly deployed app at https://[PROJECT_ID].appspot.com
Use Stackdriver Debugger
You can now go to the Debug page, take a snapshot and debug incoming traffic without actually stopping the app.
Open main.py and click on a line number to set the debug snapshot location
Refresh the website displaying the hello world page, and you'll see the request snapshot taken in the debugger
Note that the Debug page displays the source code version of your deployed app
Summary
Now you know how to use Cloud Shell and the code editor to write a sample app, push it into a cloud source repository, deploy it to App Engine Standard, and debug it with Stackdriver Debugger — all without leaving your browser. Note that the new Cloud Shell code editor is just a first step toward making Cloud Shell developers’ go-to environment for everything from simple DevOps tasks to end-to-end software development. We welcome your feedback (click on the gear icon in Shell toolbar->Send Feedback) on how to improve Google Cloud Shell. Stay tuned for new features and functionality.