Index

src/agent/debuglet.ts

ALLOW_EXPRESSIONS_MESSAGE
Default value : 'Expressions and conditions are not allowed' + ' by default. Please set the allowExpressions configuration option to true.' + ' See the debug agent documentation at https://goo.gl/ShSm6r.'
BREAKPOINT_ACTION_MESSAGE
Default value : 'The only currently supported breakpoint actions' + ' are CAPTURE and LOG.'
formatBreakpoint
Default value : ( msg: string, breakpoint: stackdriver.Breakpoint ): string => { let text = msg + util.format( 'breakpoint id: %s,\n\tlocation: %s', breakpoint.id, util.inspect(breakpoint.location) ); if (breakpoint.createdTime) { const unixTime = Number(breakpoint.createdTime.seconds); const date = new Date(unixTime * 1000); // to milliseconds. text += '\n\tcreatedTime: ' + date.toString(); } if (breakpoint.condition) { text += '\n\tcondition: ' + util.inspect(breakpoint.condition); } if (breakpoint.expressions) { text += '\n\texpressions: ' + util.inspect(breakpoint.expressions); } return text; }

Formats a breakpoint object prefixed with a provided message as a string intended for logging.

formatBreakpoints
Default value : ( msg: string, breakpoints: {[key: string]: stackdriver.Breakpoint} ): string => { return ( msg + Object.keys(breakpoints) .map(b => { return formatBreakpoint('', breakpoints[b]); }) .join('\n') ); }

Formats a map of breakpoint objects prefixed with a provided message as a string intended for logging.

NODE_10_CIRC_REF_MESSAGE
Default value : 'capture.maxDataSize=0 is not recommended on older versions of Node 10/11' + ' and Node 12.' + ' See https://github.com/googleapis/cloud-debug-nodejs/issues/516 for more' + ' information.'
NODE_VERSION_MESSAGE
Default value : 'Node.js version not supported. Node.js 5.2.0 and ' + 'versions older than 0.12 are not supported.'
PROMISE_RESOLVE_CUT_OFF_IN_MILLISECONDS
Default value : ((40 + 540) / 2) * 1000
readFilep
Default value : util.promisify(fs.readFile)

src/agent/state/legacy-state.ts

ARG_LOCAL_LIMIT_MESSAGE_INDEX
Type : number
Default value : 3
assert
Default value : debugAssert(!!process.env.CLOUD_DEBUG_ASSERTIONS)
BUFFER_FULL_MESSAGE_INDEX
Type : number
Default value : 0
GETTER_MESSAGE_INDEX
Type : number
Default value : 2
NATIVE_PROPERTY_MESSAGE_INDEX
Type : number
Default value : 1

src/agent/state/inspector-state.ts

ARG_LOCAL_LIMIT_MESSAGE_INDEX
Type : number
Default value : 3
assert
Default value : debugAssert(!!process.env.CLOUD_DEBUG_ASSERTIONS)
BUFFER_FULL_MESSAGE_INDEX
Type : number
Default value : 0
FILE_PROTOCOL
Type : string
Default value : 'file://'
GETTER_MESSAGE_INDEX
Type : number
Default value : 2
NATIVE_PROPERTY_MESSAGE_INDEX
Type : number
Default value : 1
NO_STABLE_OBJECT_ID
Default value : -1
STABLE_OBJECT_ID_PROPERTY
Type : string
Default value : '[[StableObjectId]]'

src/agent/io/sourcemapper.ts

CONCURRENCY
Type : number
Default value : 10
MAP_EXT
Type : string
Default value : '.map'
readFilep
Default value : promisify(fs.readFile)
WEBPACK_PREFIX
Type : string
Default value : 'webpack://'

src/agent/v8/debugapi.ts

debugApiConstructor
Type : DebugApiConstructor
MODULE_WRAP_PREFIX_LENGTH
Default value : require('module') .wrap('☃') .indexOf('☃')
singleton
Type : DebugApi

src/index.ts

debuglet
Type : Debuglet
pjson
Default value : require('../../package.json')

src/agent/config.ts

defaultConfig
Type : ResolvedDebugAgentConfig
Default value : { // FIXME(ofrobots): presently this is dependent what cwd() is at the time this // file is first required. We should make the default config static. workingDirectory: process.cwd(), allowRootAsWorkingDirectory: false, description: undefined, allowExpressions: false, // FIXME(ofrobots): today we prioritize GAE_MODULE_NAME/GAE_MODULE_VERSION // over the user specified config. We should reverse that. serviceContext: { service: undefined, version: undefined, minorVersion_: undefined, }, appPathRelativeToRepository: undefined, javascriptFileExtensions: ['.js'], pathResolver: undefined, logLevel: 1, breakpointUpdateIntervalSec: 10, breakpointExpirationSec: 60 * 60 * 24, // 24 hours capture: { includeNodeModules: false, maxFrames: 20, maxExpandFrames: 5, maxProperties: 10, maxDataSize: 20000, maxStringLength: 100, }, log: {maxLogsPerSecond: 50, logDelaySeconds: 1, logFunction: console.log}, internal: { registerDelayOnFetcherErrorSec: 300, // 5 minutes. maxRegistrationRetryDelay: 40, }, forceNewAgent_: false, testMode_: false, }

src/agent/util/debug-assert.ts

fakeAssert
Type : FakeAssert
Default value : { deepEqual: nop, deepStrictEqual: nop, doesNotThrow: nop, equal: nop, fail: nop, ifError: nop, notDeepEqual: nop, notDeepStrictEqual: nop, notEqual: nop, notStrictEqual: nop, ok: nop, strictEqual: nop, throws: nop, AssertionError: nop, rejects: nop, doesNotReject: nop, strict: nop, }
nop
Default value : (_: {}) => _

src/agent/io/scanner.ts

findit
Type : events.EventEmitter
Default value : require('findit2')
split
Type : fs.WriteStream
Default value : require('split')

src/agent/util/utils.ts

formatInterval
Default value : (msg: string, interval: number[]): string => { return msg + (interval[0] * 1000 + interval[1] / 1000000) + 'ms'; }

Formats a provided message and a high-resolution interval of the format [seconds, nanoseconds] (for example, from process.hrtime()) prefixed with a provided message as a string intended for logging.

messages
Type : object
Default value : { INVALID_BREAKPOINT: 'invalid snapshot - id or location missing', SOURCE_FILE_NOT_FOUND: 'A script matching the source file was not found loaded on the debuggee', SOURCE_FILE_AMBIGUOUS: 'Multiple files match the path specified', V8_BREAKPOINT_ERROR: 'Unable to set breakpoint in v8', V8_BREAKPOINT_CLEAR_ERROR: 'Unable to clear breakpoint in v8', SYNTAX_ERROR_IN_CONDITION: 'Syntax error in condition: ', ERROR_EVALUATING_CONDITION: 'Error evaluating condition: ', ERROR_COMPILING_CONDITION: 'Error compiling condition.', DISALLOWED_EXPRESSION: 'Expression not allowed', SOURCE_MAP_READ_ERROR: 'The source map could not be read or was incorrectly formatted', V8_BREAKPOINT_DISABLED: 'Internal error: V8 breakpoint externally disabled', CAPTURE_BREAKPOINT_DATA: 'Error trying to capture snapshot data: ', INVALID_LINE_NUMBER: 'Invalid snapshot position: ', COULD_NOT_FIND_OUTPUT_FILE: 'Could not determine the output file associated with the transpiled input file', }

src/agent/v8/inspector-debugapi.ts

USE_MODULE_PREFIX
Default value : utils.satisfies( process.version, '<10.16 || >=11 <11.11' )

In older versions of Node, the script source as seen by the Inspector backend is wrapped in require('module').wrapper, and in new versions (Node 10.16+, Node 11.11+, Node 12+) it's not. This affects line-1 breakpoints.

result-matching ""

    No results matching ""