{"id":13981127,"url":"https://github.com/googleapis/cloud-debug-nodejs","last_synced_at":"2025-07-21T21:31:12.083Z","repository":{"id":31119730,"uuid":"34679272","full_name":"googleapis/cloud-debug-nodejs","owner":"googleapis","description":"Node.js agent for Google Cloud Debugger: investigate your code’s behavior in production","archived":true,"fork":false,"pushed_at":"2024-02-01T20:04:26.000Z","size":4916,"stargazers_count":168,"open_issues_count":0,"forks_count":50,"subscribers_count":60,"default_branch":"main","last_synced_at":"2025-07-10T22:42:31.423Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cloud.google.com/debugger/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"airbnb/javascript","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleapis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-27T16:57:45.000Z","updated_at":"2024-04-24T15:31:22.000Z","dependencies_parsed_at":"2024-01-13T10:42:57.726Z","dependency_job_id":"5ab24dab-ba88-4735-b8d2-4b84ecc94c9b","html_url":"https://github.com/googleapis/cloud-debug-nodejs","commit_stats":{"total_commits":830,"total_committers":48,"mean_commits":"17.291666666666668","dds":0.8204819277108434,"last_synced_commit":"72040e0a296b1df7eefc8ee99313b635848ffc98"},"previous_names":["googlecloudplatform/cloud-debug-nodejs"],"tags_count":72,"template":false,"template_full_name":null,"purl":"pkg:github/googleapis/cloud-debug-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fcloud-debug-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fcloud-debug-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fcloud-debug-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fcloud-debug-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleapis","download_url":"https://codeload.github.com/googleapis/cloud-debug-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleapis%2Fcloud-debug-nodejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266381941,"owners_count":23920597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T04:02:02.863Z","updated_at":"2025-07-21T21:31:11.471Z","avatar_url":"https://github.com/googleapis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[//]: # \"This README.md file is auto-generated, all changes to this file will be lost.\"\n[//]: # \"To regenerate it, use `python -m synthtool`.\"\n\u003cimg src=\"https://avatars2.githubusercontent.com/u/2810941?v=3\u0026s=96\" alt=\"Google Cloud Platform logo\" title=\"Google Cloud Platform\" align=\"right\" height=\"96\" width=\"96\"/\u003e\n\n# [Cloud Debugger: Node.js Client](https://github.com/googleapis/cloud-debug-nodejs)\n\n[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages)\n[![npm version](https://img.shields.io/npm/v/@google-cloud/debug-agent.svg)](https://www.npmjs.org/package/@google-cloud/debug-agent)\n\n\n\n\n\u003e This module provides Snapshot Debugger support for Node.js applications.\nSnapshot Debugger is an open source product that lets you debug your\napplications in production without stopping or pausing your application.\n\nA Firebase Realtime Database instance is used to store your data.\n\n## Project Status: Archived\n\nThis project has been archived and is no longer supported. There will be no\nfurther bug fixes or security patches. The repository can be forked by users\nif they want to maintain it going forward.\n\n\nA comprehensive list of changes in each version may be found in\n[the CHANGELOG](https://github.com/googleapis/cloud-debug-nodejs/blob/main/CHANGELOG.md).\n\n* [Cloud Debugger Node.js Client API Reference][client-docs]\n* [Cloud Debugger Documentation][product-docs]\n* [github.com/googleapis/cloud-debug-nodejs](https://github.com/googleapis/cloud-debug-nodejs)\n\nRead more about the client libraries for Cloud APIs, including the older\nGoogle APIs Client Libraries, in [Client Libraries Explained][explained].\n\n[explained]: https://cloud.google.com/apis/docs/client-libraries-explained\n\n**Table of contents:**\n\n\n* [Quickstart](#quickstart)\n  * [Before you begin](#before-you-begin)\n  * [Installing the client library](#installing-the-client-library)\n\n* [Samples](#samples)\n* [Versioning](#versioning)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Quickstart\n\n### Before you begin\n\n1.  [Select or create a Cloud Platform project][projects].\n1.  [Enable the Cloud Debugger API][enable_api].\n1.  [Set up authentication with a service account][auth] so you can access the\n    API from your local workstation.\n\n### Installing the client library\n\n```bash\nnpm install @google-cloud/debug-agent\n```\n\n## Debugger Agent Settings\n\nTo customize the behaviour of the automatic debugger agent, specify options\nwhen starting the agent. The following code sample shows how to pass in a\nsubset of the available options.\n\n```js\nrequire('@google-cloud/debug-agent').start({\n  // .. auth settings ..\n\n  // debug agent settings:\n  allowExpressions: true,\n  serviceContext: {\n    service: 'my-service',\n    version: 'version-1'\n  },\n  capture: { maxFrames: 20, maxProperties: 100 }\n});\n```\n\nThe following options configure the connection to the Firebase database:\n  * firebaseDbUrl - https://**PROJECT_ID**-cdbg.firebaseio.com will be used if\n    not provided. where **PROJECT_ID** is your project ID.\n  * firebaseKeyPath - Default google application credentials are used if not\n    provided.\n\nSome key configuration options are:\n  * allowExpressions - Whether or not it is permitted to evaluate\n    epressions.  Functionality is limited when this is not set, but there\n    is some risk that malicious expressions can mutate program state.\n  * serviceContext - This information is utilized in the UI to identify all\n    the running instances of your service.  Set this if you do not like the\n    default values.\n  * capture - Configuration options on what is captured on a snapshot.  Set\n    this if the default snapshot captures are too limited.  Note that\n    relaxing constraints may cause performance impact.\n\nSee [the agent configuration][config-ts] for a list of possible configuration\noptions.\n\n## Using the Debugger\n\nOnce your application is running, use the\n[Snapshot Debugger CLI](https://pypi.org/project/snapshot-dbg-cli/) or the\n[VSCode extension][extension-page]\nto debug your application.\n\n## Historical note\n\nVersion 6.x and 7.x of this agent supported both the now shutdown Cloud\nDebugger service (by default) and the\n[Snapshot Debugger](https://github.com/GoogleCloudPlatform/snapshot-debugger/)\n(Firebase RTDB backend) by setting the `useFirebase` flag to true. Version 8.0.0\nremoved support for the Cloud Debugger service, making the Snapshot Debugger the\ndefault.  To note the `useFirebase` flag is now obsolete, but still present for\nbackward compatibility.\n\n## Limitations and Requirements\n\n\u003e Note: There is a known issue where enabling the agent may trigger memory\nleaks.  See [#811](https://github.com/googleapis/cloud-debug-nodejs/issues/811)\n\n* Privacy issues can be created by setting snapshot conditions that watch\n  expressions evaluated in the context of your application. You may be able\n  to view sensitive user data when viewing the values of variables.\n* The debug agent tries to ensure that all conditions and watchpoints you\n  add are read-only and have no side effects. It catches, and disallows,\n  all expressions that may have static side effects to prevent accidental\n  state change. However, it presently does not catch expressions that have\n  dynamic side-effects. For example, `o.f` looks like a property access,\n  but dynamically, it may end up calling a getter function. We presently do\n  NOT detect such dynamic-side effects.\n* The root directory of your application needs to contain a `package.json`\n  file.\n\n[config-ts]: https://github.com/googleapis/cloud-debug-nodejs/blob/main/src/agent/config.ts\n[extension-page]: https://github.com/GoogleCloudPlatform/snapshot-debugger/tree/main/snapshot_dbg_extension\n[snapshot-debugger-readme]: https://github.com/GoogleCloudPlatform/snapshot-debugger#readme\n\n\n## Samples\n\nSamples are in the [`samples/`](https://github.com/googleapis/cloud-debug-nodejs/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.\n\n| Sample                      | Source Code                       | Try it |\n| --------------------------- | --------------------------------- | ------ |\n| App | [source code](https://github.com/googleapis/cloud-debug-nodejs/blob/main/samples/app.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/cloud-debug-nodejs\u0026page=editor\u0026open_in_editor=samples/app.js,samples/README.md) |\n| Snippets | [source code](https://github.com/googleapis/cloud-debug-nodejs/blob/main/samples/snippets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/cloud-debug-nodejs\u0026page=editor\u0026open_in_editor=samples/snippets.js,samples/README.md) |\n\n\n\nThe [Cloud Debugger Node.js Client API Reference][client-docs] documentation\nalso contains samples.\n\n## Supported Node.js Versions\n\nOur client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).\nLibraries are compatible with all current _active_ and _maintenance_ versions of\nNode.js.\nIf you are using an end-of-life version of Node.js, we recommend that you update\nas soon as possible to an actively supported LTS version.\n\nGoogle's client libraries support legacy versions of Node.js runtimes on a\nbest-efforts basis with the following warnings:\n\n* Legacy versions are not tested in continuous integration.\n* Some security patches and features cannot be backported.\n* Dependencies cannot be kept up-to-date.\n\nClient libraries targeting some end-of-life versions of Node.js are available, and\ncan be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).\nThe dist-tags follow the naming convention `legacy-(version)`.\nFor example, `npm install @google-cloud/debug-agent@legacy-8` installs client libraries\nfor versions compatible with Node.js 8.\n\n## Versioning\n\nThis library follows [Semantic Versioning](http://semver.org/).\n\n\n\nThis library is considered to be **stable**. The code surface will not change in backwards-incompatible ways\nunless absolutely necessary (e.g. because of critical security issues) or with\nan extensive deprecation period. Issues and requests against **stable** libraries\nare addressed with the highest priority.\n\n\n\n\n\n\nMore Information: [Google Cloud Platform Launch Stages][launch_stages]\n\n[launch_stages]: https://cloud.google.com/terms/launch-stages\n\n## Contributing\n\nContributions welcome! See the [Contributing Guide](https://github.com/googleapis/cloud-debug-nodejs/blob/main/CONTRIBUTING.md).\n\nPlease note that this `README.md`, the `samples/README.md`,\nand a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)\nare generated from a central template. To edit one of these files, make an edit\nto its templates in\n[directory](https://github.com/googleapis/synthtool).\n\n## License\n\nApache Version 2.0\n\nSee [LICENSE](https://github.com/googleapis/cloud-debug-nodejs/blob/main/LICENSE)\n\n[client-docs]: https://cloud.google.com/nodejs/docs/reference/debug-agent/latest\n[product-docs]: https://cloud.google.com/debugger\n[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png\n[projects]: https://console.cloud.google.com/project\n[billing]: https://support.google.com/cloud/answer/6293499#enable-billing\n[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=clouddebugger.googleapis.com\n[auth]: https://cloud.google.com/docs/authentication/getting-started\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleapis%2Fcloud-debug-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleapis%2Fcloud-debug-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleapis%2Fcloud-debug-nodejs/lists"}