Objective 2.1
PCDSetting up your development environment
Objective 2.1 sits in Building and testing applications, which carries 23% of the Cloud Developer exam. The questions below are original, written from the official objective title above, and each explanation cites the Google Cloud page it rests on.
Objective title verbatim from the official objectives. Google Cloud exam page ↗
A worked example
Shown solved, with the whole explanation open: this is what every question here carries.
A team wants one piece of function code to run on a laptop and on the managed runtime with no edits. What does the framework do to allow that?
Correct.
Concept
A handler becomes portable once something else owns the job of listening for requests and calling it, since that wrapper can be run anywhere the language runs.
Why A
The framework libraries wrap a deployed function in a long-lived HTTP application, and the same libraries run on any platform supporting the language, including a workstation or an on-premises server.
Source
Local functions development, checked August 2026Cloud Run uses the open-source Functions Framework libraries to wrap your deployed functions in a persistent HTTP application. The Functions Framework can also run on any other platform that supports the language itself, including your local machine, on-premises servers, and Compute Engine .
Now you: objective 2.1 questions
No account needed. The explanation opens when you answer.
Sample question 1 of 3
An engineer starting a function locally needs it to answer on a port other than the usual one. Which two controls set the listening port?
Sample question 2 of 3
A team asks whether an event-driven function written in one language can use the same local framework as an HTTP one. What holds across the runtimes?
Sample question 3 of 3
A team has a Java function with a target named in the build file, another in an environment variable and a third on the command line. Which one wins?
Full Cloud Developer question bank coming
We’re writing the complete bank from the official objectives right now. Leave your email and we’ll tell you when it ships, nothing else, ever.
Read the sources
These are the official pages the questions above cite. Reading them is studying the objective from the primary source, which is what the explanations point you toward anyway.