Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
Update options in README (#249)
Browse files Browse the repository at this point in the history
PR-URL: #249
  • Loading branch information
matthewloring authored Mar 10, 2017
1 parent 36a0c2c commit 3256eed
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ npm install --save @google-cloud/debug-agent

```js
// Require and start in the startup of your application:
require('@google-cloud/debug-agent').start();
require('@google-cloud/debug-agent').start({ allowExpressions: true });
// No auth necessary if your code is running on Google Cloud Platform.

// ... or, if you are running elsewhere, you can manually provide credentials:
require('@google-cloud/debug-agent').start({
allowExpressions: true,
projectId: 'particular-future-12345',
keyFilename: '/path/to/keyfile.json'
});
Expand Down Expand Up @@ -56,6 +57,7 @@ If your application is running outside of Google Cloud Platform, such as locally
```JS
// In your app:
var debug = require('@google-cloud/debug-agent').start({
allowExpressions: true,
projectId: 'particular-future-12345',
keyFilename: '/path/to/keyfile.json'
});
Expand All @@ -77,6 +79,9 @@ If your application is running outside of Google Cloud Platform, such as locally
```js
// Require and start the agent with configuration options
require('@google-cloud/debug-agent').start({
// Allow the evaluation of watch expressions and snapshot conditions:
allowExpressions: true,
// The path to your key file:
keyFilename: '/path/to/keyfile.json',
Expand All @@ -93,20 +98,19 @@ If your application is running outside of Google Cloud Platform, such as locally

## Debugger Agent Settings

You can customize the behaviour of the automatic debugger agent. 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.
You can customize the behaviour of the automatic debugger agent. See [the agent configuration][config-js] for a list of possible configuration options. These options can be passed in the `options` object passed to the `start` function.

```JS
require('@google-cloud/debug-agent').start({
// .. auth settings ..

// debug agent settings:
debug: {
serviceContext: {
service: 'my-service',
version: 'version-1'
},
capture: { maxFrames: 20, maxProperties: 100 }
}
allowExpressions: true,
serviceContext: {
service: 'my-service',
version: 'version-1'
},
capture: { maxFrames: 20, maxProperties: 100 }
});
```

Expand Down

0 comments on commit 3256eed

Please sign in to comment.