Registry /
gcp / google-python-cloud-debugger
Install & Compatibility
Where this runs
tested against v4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✓ 8.6s
py 3.11
✕ build_error
✕ build_error
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 10.2s
87MB installed
● package 87MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
start
✓ from snapshot_debugger import start
✗ import googleclouddebugger
Since version 3.0, and especially 4.0, the package `google-python-cloud-debugger` installs the module `snapshot_debugger`. The old `googleclouddebugger` module is no longer supported.
This quickstart demonstrates how to initialize the Snapshot Debugger in your Python application. After calling `snapshot_debugger.start()`, your application will connect to the Google Cloud Console, allowing you to set breakpoints and inspect variables without redeploying. Ensure your Google Cloud project is configured for Cloud Debugger and the service account has the necessary permissions (e.g., Cloud Debugger, Firebase Realtime Database Admin).
import snapshot_debugger
import os
# snapshot_debugger.start() attempts to auto-detect project ID and config.
# For local testing, you might need to specify it or set environment variables.
# Example for App Engine, Cloud Functions, GKE etc. it usually works out of the box.
# For manual configuration if needed:
# snapshot_debugger.start(project_id='your-gcp-project-id', module='your-app-name', version='1.0')
# In a typical cloud environment, simply calling start() is sufficient.
# Ensure your service account has 'Cloud Debugger' role.
# For Firebase backend, the service account needs 'Firebase Realtime Database Admin' role.
snapshot_debugger.start()
print('Snapshot Debugger started. You can now set breakpoints in the Google Cloud Console.')
def main():
x = 10
y = 20
z = x + y # Set a breakpoint here in Google Cloud Console
print(f'Result: {z}')
if __name__ == '__main__':
main()
Debug
Known issues
breakingVersion 4.0 of `google-python-cloud-debugger` removes support for the deprecated Cloud Debugger API backend. It now exclusively uses the Firebase Realtime Database backend.fixEnsure your service account has permissions for Firebase Realtime Database and that your application can connect to Firebase. Existing integrations using the old API will break and require an update.
affects: >=4.0
gotchaThe PyPI package name is `google-python-cloud-debugger`, but the module you import and use is `snapshot_debugger`.fixAlways use `from snapshot_debugger import ...` or `import snapshot_debugger` in your code. Do not attempt to import `googleclouddebugger` which is for older, unsupported versions.
affects: >=3.0
deprecatedThe original Cloud Debugger API has been deprecated by Google. The `google-python-cloud-debugger` library has shifted to use Firebase Realtime Database as its backend for snapshot debugging.fixMigrate any existing Cloud Debugger API-specific configurations to leverage the Firebase Realtime Database backend. Ensure your environment and service accounts are configured for Firebase access.
affects: All versions, but enforced as breaking in >=4.0
gotchaPython 2.7 support was dropped in version 2.19. Modern versions of the library (>=3.x) require Python 3.7 or newer.fixEnsure your application runs on Python 3.7 or a newer compatible version. Upgrade your Python runtime if you are still on 2.7 or an older 3.x version.
affects: >=2.19
Upgrade
Version history
4.1latest on PyPI · released Jun 6, 2023
Audit
Dependencies
firebase-adminrequiredRequired for the Firebase Realtime Database backend, which is the default and only supported backend since v4.0.