Debugging Cloud Functions

You can inspect the runtime state of your Cloud Functions using the Stackdriver Debugger agent for Node.js.

From your functions directory, add the dependency:

npm install --save @google-cloud/debug-agent

Then start the agent at the top of your functions/index.js:

require('@google-cloud/debug-agent').start({ allowExpressions: true });

Deploy your application, and navigate to the Stackdriver Debug view within the Google Cloud Console to set snapshots and start debugging. To learn more, review the README for the Stackdriver Debugger.

Send feedback about...

Need help? Visit our support page.