You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+21-19Lines changed: 21 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,29 +19,27 @@ This module provides Stackdriver Debugger support for Node.js applications. [Sta
19
19
## Quick Start
20
20
```shell
21
21
# Install with `npm` or add to your `package.json`.
22
-
npm install --save @google-cloud/debug
22
+
npm install --save @google-cloud/debug-agent
23
23
```
24
24
25
25
```js
26
26
// Require and start in the startup of your application:
27
-
var debug =require('@google-cloud/debug')();
28
-
debug.startAgent();
27
+
require('@google-cloud/debug-agent').start();
29
28
// No auth necessary if your code is running on Google Cloud Platform.
30
29
31
30
// ... or, if you are running elsewhere, you can manually provide credentials:
32
-
var debug =require('@google-cloud/debug')({
31
+
require('@google-cloud/debug-agent').start({
33
32
projectId:'particular-future-12345',
34
33
keyFilename:'/path/to/keyfile.json'
35
34
});
36
-
debug.startAgent();
37
35
```
38
36
39
37
This starts the automatic Debugger Agent that enables your app to be debuggable using the Stackdriver [Stackdriver Debug view][debug-tab] within
40
38
the [Google Cloud Console][dev-console]. You can start adding snapshots and log-points to your application.
41
39
42
40
## Running on Google Cloud Platform
43
41
44
-
The Stackdriver Debugger Agent should work without manually provided authentication credentials for instances running on Google Cloud Platform, as long as the [Stackdriver Debugger API][debugger-api] access scope is enabled on that instance. For Google App Engine instances, this is automatic if the Debugger API has been enabled for your project (which it is by default).
42
+
The Stackdriver Debugger Agent should work without manually provided authentication credentials for instances running on Google Cloud Platform, as long as the [Stackdriver Debugger API][debugger-api] access scope is enabled on that instance. For Google App Engine instances, this is automatic if the Debugger API has been enabled for your project (which is the default).
45
43
46
44
For Google Compute Engine instances, you need to explicitly enable the Debugger API access scope for each instance. When creating a new instance through the GCP web console, you can do this in one of two ways under **Identity and API access**:
47
45
* Use the Compute Engine default service account and select "Allow full access to all Cloud APIs" under Access scopes.
@@ -57,16 +55,15 @@ If your application is running outside of Google Cloud Platform, such as locally
57
55
58
56
```JS
59
57
// In your app:
60
-
var debug =require('@google-cloud/debug')({
58
+
var debug =require('@google-cloud/debug-agent').start({
61
59
projectId:'particular-future-12345',
62
60
keyFilename:'/path/to/keyfile.json'
63
61
});
64
-
debug.startAgent();
65
62
```
66
63
67
64
```BASH
68
65
# Or in Bash:
69
-
export GCLOUD_PROJECT=<project name>
66
+
export GCLOUD_PROJECT='particular-future-12345'
70
67
```
71
68
72
69
1. You need to provide service account credentials to your application.
@@ -79,7 +76,7 @@ If your application is running outside of Google Cloud Platform, such as locally
79
76
80
77
```js
81
78
// Require and start the agent with configuration options
82
-
require('@google-cloud/debug').start({
79
+
require('@google-cloud/debug-agent').start({
83
80
// The path to your key file:
84
81
keyFilename: '/path/to/keyfile.json',
85
82
@@ -96,15 +93,20 @@ If your application is running outside of Google Cloud Platform, such as locally
96
93
97
94
## Debugger Agent Settings
98
95
99
-
You can customize the behaviour of the automatic debuggeragent. See [the agent configuration][config-js] for a list of possible configuration options. These options can be passed to the agent through the object argument to the startAgent method as shown below:
96
+
You can customize the behaviour of the automatic debuggeragent. See [the agent configuration][config-js] for a list of possible configuration options. These options can be passed in the `options.debug`object passed to the `start`function.
0 commit comments