1010
1111
1212
13- > This module provides Cloud Debugger support for Node.js applications.
14- Cloud Debugger is a feature of Google Cloud Platform that lets you debug your
13+ > This module provides Snapshot Debugger support for Node.js applications.
14+ Snapshot Debugger is an open source product that lets you debug your
1515applications in production without stopping or pausing your application.
1616
17+ A Firebase Realtime Database instance is used to store your data.
18+
1719
1820A comprehensive list of changes in each version may be found in
1921[ the CHANGELOG] ( https://github.com/googleapis/cloud-debug-nodejs/blob/main/CHANGELOG.md ) .
@@ -74,56 +76,31 @@ require('@google-cloud/debug-agent').start({
7476});
7577```
7678
79+ The following options configure the connection to the Firebase database:
80+ * firebaseDbUrl - https://** PROJECT_ID** -cdbg.firebaseio.com will be used if
81+ not provided. where ** PROJECT_ID** is your project ID.
82+ * firebaseKeyPath - Default google application credentials are used if not
83+ provided.
84+
7785See [ the agent configuration] [ config-ts ] for a list of possible configuration
7886options.
7987
8088## Using the Debugger
8189
82- Once your application is running, use the [ Debug UI] [ debug-tab ] in your Cloud
83- [ developer console] [ dev-console ] to debug your application. The Debug UI can
84- be found in the 'Operations -> Debug' section in the navigation panel, or by
85- simply searching for 'Debug' in the cloud console.
86-
87- To take a snapshot with the debugger:
88- 1 . Click in the gutter (line number area) or enter a filename and line number
89- in the snapshot panel
90- 2 . The debugger inserts a momentary breakpoint at the specified location in
91- your code in the running instance of your application.
92- 3 . As soon as that line of code is reached in any of the running instances of
93- your application, the stack traces, local variables, and watch expressions
94- are captured, and your application continues.
95-
96- ** Note:** The directory layout of the code that is being debugged does not
97- have to exactly match the source code specified in the Debug UI. This is
98- because the debug agent resolves a snapshot filename by searching for a file
99- with the longest matching path suffix. If a unique match is found, that file
100- will be used to set the snapshot.
101-
102- ## Snapshot Debugger - Firebase Realtime Database Backend
103-
104- This functionality is available for release 6.0.0 onward of this agent and
105- provides support for the Snapshot Debugger, which is being provided as a
106- replacement for the deprecated Cloud Debugger service.
107-
108- To enable the agent, add the following at the top of your app's main script
109- or entry point:
110-
111- ``` js
112- require (' @google-cloud/debug-agent' ).start ({
113- useFirebase: true ,
114- firebaseDbUrl: ' https://my-database-url.firebaseio.com' ,
115- firebaseKeyPath: ' path/to/service_account.json' ,
116- });
117- ```
90+ Once your application is running, use the
91+ [ Snapshot Debugger CLI] ( https://pypi.org/project/snapshot-dbg-cli/ ) or the
92+ [ VSCode extension] [ extension-page ]
93+ to debug your application.
11894
119- The following params are optional:
120- * firebaseDbUrl - https://** PROJECT_ID** -cdbg.firebaseio.com will be used if
121- not provided. where ** PROJECT_ID** is your project ID.
122- * firebaseKeyPath - Default google application credentials are used if not
123- provided.
95+ ## Historical note
12496
125- See https://github.com/GoogleCloudPlatform/snapshot-debugger and
126- https://cloud.google.com/debugger/docs/deprecations for more details.
97+ Version 6.x and 7.x of this agent supported both the now shutdown Cloud
98+ Debugger service (by default) and the
99+ [ Snapshot Debugger] ( https://github.com/GoogleCloudPlatform/snapshot-debugger/ )
100+ (Firebase RTDB backend) by setting the ` useFirebase ` flag to true. Version 8.0.0
101+ removed support for the Cloud Debugger service, making the Snapshot Debugger the
102+ default. To note the ` useFirebase ` flag is now obsolete, but still present for
103+ backward compatibility.
127104
128105## Limitations and Requirements
129106
@@ -144,8 +121,7 @@ leaks. See [#811](https://github.com/googleapis/cloud-debug-nodejs/issues/811)
144121 file.
145122
146123[ config-ts ] : https://github.com/googleapis/cloud-debug-nodejs/blob/master/src/agent/config.ts
147- [ debug-tab ] : https://console.cloud.google.com/debug
148- [ dev-console ] : https://console.cloud.google.com/
124+ [ extension-page ] : https://github.com/GoogleCloudPlatform/snapshot-debugger/tree/main/snapshot_dbg_extension
149125[ snapshot-debugger-readme ] : https://github.com/GoogleCloudPlatform/snapshot-debugger#readme
150126
151127
0 commit comments