Documentation ¶
Overview ¶
Package debugger implements the Debugger domain. Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing breakpoints, stepping through execution, exploring stack traces, etc.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type BreakLocation
- type BreakpointID
- type BreakpointResolvedClient
- type BreakpointResolvedReply
- type CallFrame
- type CallFrameID
- type ContinueToLocationArgs
- type DebugSymbols
- type EnableArgs
- type EnableReply
- type EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetGeneratePreview(generatePreview bool) *EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetIncludeCommandLineAPI(includeCommandLineAPI bool) *EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetObjectGroup(objectGroup string) *EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetReturnByValue(returnByValue bool) *EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetSilent(silent bool) *EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetThrowOnSideEffect(throwOnSideEffect bool) *EvaluateOnCallFrameArgs
- func (a *EvaluateOnCallFrameArgs) SetTimeout(timeout runtime.TimeDelta) *EvaluateOnCallFrameArgs
- type EvaluateOnCallFrameReply
- type GetPossibleBreakpointsArgs
- type GetPossibleBreakpointsReply
- type GetScriptSourceArgs
- type GetScriptSourceReply
- type GetStackTraceArgs
- type GetStackTraceReply
- type GetWasmBytecodeArgs
- type GetWasmBytecodeReply
- type Location
- type LocationRange
- type PauseOnAsyncCallArgs
- type PausedClient
- type PausedReply
- type RemoveBreakpointArgs
- type RestartFrameArgs
- type RestartFrameReply
- type ResumeArgs
- type ResumedClient
- type ResumedReply
- type Scope
- type ScriptFailedToParseClient
- type ScriptFailedToParseReply
- type ScriptLanguage
- type ScriptParsedClient
- type ScriptParsedReply
- type ScriptPosition
- type SearchInContentArgs
- type SearchInContentReply
- type SearchMatch
- type SetAsyncCallStackDepthArgs
- type SetBlackboxPatternsArgs
- type SetBlackboxedRangesArgs
- type SetBreakpointArgs
- type SetBreakpointByURLArgs
- func (a *SetBreakpointByURLArgs) SetColumnNumber(columnNumber int) *SetBreakpointByURLArgs
- func (a *SetBreakpointByURLArgs) SetCondition(condition string) *SetBreakpointByURLArgs
- func (a *SetBreakpointByURLArgs) SetScriptHash(scriptHash string) *SetBreakpointByURLArgs
- func (a *SetBreakpointByURLArgs) SetURL(url string) *SetBreakpointByURLArgs
- func (a *SetBreakpointByURLArgs) SetURLRegex(urlRegex string) *SetBreakpointByURLArgs
- type SetBreakpointByURLReply
- type SetBreakpointOnFunctionCallArgs
- type SetBreakpointOnFunctionCallReply
- type SetBreakpointReply
- type SetBreakpointsActiveArgs
- type SetInstrumentationBreakpointArgs
- type SetInstrumentationBreakpointReply
- type SetPauseOnExceptionsArgs
- type SetReturnValueArgs
- type SetScriptSourceArgs
- type SetScriptSourceReply
- type SetSkipAllPausesArgs
- type SetVariableValueArgs
- type StepIntoArgs
- type StepOverArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BreakLocation ¶
type BreakLocation struct { ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the `Debugger.scriptParsed`. LineNumber int `json:"lineNumber"` // Line number in the script (0-based). ColumnNumber *int `json:"columnNumber,omitempty"` // Column number in the script (0-based). // Type // // Values: "debuggerStatement", "call", "return". Type *string `json:"type,omitempty"` }
BreakLocation
type BreakpointResolvedClient ¶
type BreakpointResolvedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*BreakpointResolvedReply, error) rpcc.Stream }
BreakpointResolvedClient is a client for BreakpointResolved events. Fired when breakpoint is resolved to an actual script and location.
type BreakpointResolvedReply ¶
type BreakpointResolvedReply struct { BreakpointID BreakpointID `json:"breakpointId"` // Breakpoint unique identifier. Location Location `json:"location"` // Actual breakpoint location. }
BreakpointResolvedReply is the reply for BreakpointResolved events.
type CallFrame ¶
type CallFrame struct { CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier. This identifier is only valid while the virtual machine is paused. FunctionName string `json:"functionName"` // Name of the JavaScript function called on this call frame. FunctionLocation *Location `json:"functionLocation,omitempty"` // Location in the source code. Location Location `json:"location"` // Location in the source code. URL string `json:"url"` // JavaScript script name or url. ScopeChain []Scope `json:"scopeChain"` // Scope chain for this call frame. This runtime.RemoteObject `json:"this"` // `this` object for this call frame. ReturnValue *runtime.RemoteObject `json:"returnValue,omitempty"` // The value being returned, if the function is at return point. }
CallFrame JavaScript call frame. Array of call frames form the call stack.
type ContinueToLocationArgs ¶
type ContinueToLocationArgs struct { Location Location `json:"location"` // Location to continue to. // TargetCallFrames // // Values: "any", "current". TargetCallFrames *string `json:"targetCallFrames,omitempty"` }
ContinueToLocationArgs represents the arguments for ContinueToLocation in the Debugger domain.
func NewContinueToLocationArgs ¶
func NewContinueToLocationArgs(location Location) *ContinueToLocationArgs
NewContinueToLocationArgs initializes ContinueToLocationArgs with the required arguments.
func (*ContinueToLocationArgs) SetTargetCallFrames ¶
func (a *ContinueToLocationArgs) SetTargetCallFrames(targetCallFrames string) *ContinueToLocationArgs
SetTargetCallFrames sets the TargetCallFrames optional argument.
Values: "any", "current".
type DebugSymbols ¶ added in v0.29.0
type DebugSymbols struct { // Type Type of the debug symbols. // // Values: "None", "SourceMap", "EmbeddedDWARF", "ExternalDWARF". Type string `json:"type"` ExternalURL *string `json:"externalURL,omitempty"` // URL of the external symbol source. }
DebugSymbols Debug symbols available for a wasm script.
type EnableArgs ¶ added in v0.23.0
type EnableArgs struct { // MaxScriptsCacheSize The maximum size in bytes of collected scripts // (not referenced by other heap objects) the debugger can hold. Puts // no limit if parameter is omitted. // // Note: This property is experimental. MaxScriptsCacheSize *float64 `json:"maxScriptsCacheSize,omitempty"` }
EnableArgs represents the arguments for Enable in the Debugger domain.
func NewEnableArgs ¶ added in v0.23.0
func NewEnableArgs() *EnableArgs
NewEnableArgs initializes EnableArgs with the required arguments.
func (*EnableArgs) SetMaxScriptsCacheSize ¶ added in v0.23.0
func (a *EnableArgs) SetMaxScriptsCacheSize(maxScriptsCacheSize float64) *EnableArgs
SetMaxScriptsCacheSize sets the MaxScriptsCacheSize optional argument. The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.
Note: This property is experimental.
type EnableReply ¶ added in v0.15.2
type EnableReply struct { // DebuggerID Unique identifier of the debugger. // // Note: This property is experimental. DebuggerID runtime.UniqueDebuggerID `json:"debuggerId"` }
EnableReply represents the return values for Enable in the Debugger domain.
type EvaluateOnCallFrameArgs ¶
type EvaluateOnCallFrameArgs struct { CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier to evaluate on. Expression string `json:"expression"` // Expression to evaluate. ObjectGroup *string `json:"objectGroup,omitempty"` // String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`). IncludeCommandLineAPI *bool `json:"includeCommandLineAPI,omitempty"` // Specifies whether command line API should be available to the evaluated expression, defaults to false. Silent *bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. ReturnByValue *bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value. // GeneratePreview Whether preview should be generated for the result. // // Note: This property is experimental. GeneratePreview *bool `json:"generatePreview,omitempty"` ThrowOnSideEffect *bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation. // Timeout Terminate execution after timing out (number of // milliseconds). // // Note: This property is experimental. Timeout *runtime.TimeDelta `json:"timeout,omitempty"` }
EvaluateOnCallFrameArgs represents the arguments for EvaluateOnCallFrame in the Debugger domain.
func NewEvaluateOnCallFrameArgs ¶
func NewEvaluateOnCallFrameArgs(callFrameID CallFrameID, expression string) *EvaluateOnCallFrameArgs
NewEvaluateOnCallFrameArgs initializes EvaluateOnCallFrameArgs with the required arguments.
func (*EvaluateOnCallFrameArgs) SetGeneratePreview ¶
func (a *EvaluateOnCallFrameArgs) SetGeneratePreview(generatePreview bool) *EvaluateOnCallFrameArgs
SetGeneratePreview sets the GeneratePreview optional argument. Whether preview should be generated for the result.
Note: This property is experimental.
func (*EvaluateOnCallFrameArgs) SetIncludeCommandLineAPI ¶
func (a *EvaluateOnCallFrameArgs) SetIncludeCommandLineAPI(includeCommandLineAPI bool) *EvaluateOnCallFrameArgs
SetIncludeCommandLineAPI sets the IncludeCommandLineAPI optional argument. Specifies whether command line API should be available to the evaluated expression, defaults to false.
func (*EvaluateOnCallFrameArgs) SetObjectGroup ¶
func (a *EvaluateOnCallFrameArgs) SetObjectGroup(objectGroup string) *EvaluateOnCallFrameArgs
SetObjectGroup sets the ObjectGroup optional argument. String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`).
func (*EvaluateOnCallFrameArgs) SetReturnByValue ¶
func (a *EvaluateOnCallFrameArgs) SetReturnByValue(returnByValue bool) *EvaluateOnCallFrameArgs
SetReturnByValue sets the ReturnByValue optional argument. Whether the result is expected to be a JSON object that should be sent by value.
func (*EvaluateOnCallFrameArgs) SetSilent ¶
func (a *EvaluateOnCallFrameArgs) SetSilent(silent bool) *EvaluateOnCallFrameArgs
SetSilent sets the Silent optional argument. In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
func (*EvaluateOnCallFrameArgs) SetThrowOnSideEffect ¶
func (a *EvaluateOnCallFrameArgs) SetThrowOnSideEffect(throwOnSideEffect bool) *EvaluateOnCallFrameArgs
SetThrowOnSideEffect sets the ThrowOnSideEffect optional argument. Whether to throw an exception if side effect cannot be ruled out during evaluation.
func (*EvaluateOnCallFrameArgs) SetTimeout ¶ added in v0.18.1
func (a *EvaluateOnCallFrameArgs) SetTimeout(timeout runtime.TimeDelta) *EvaluateOnCallFrameArgs
SetTimeout sets the Timeout optional argument. Terminate execution after timing out (number of milliseconds).
Note: This property is experimental.
type EvaluateOnCallFrameReply ¶
type EvaluateOnCallFrameReply struct { Result runtime.RemoteObject `json:"result"` // Object wrapper for the evaluation result. ExceptionDetails *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details. }
EvaluateOnCallFrameReply represents the return values for EvaluateOnCallFrame in the Debugger domain.
type GetPossibleBreakpointsArgs ¶
type GetPossibleBreakpointsArgs struct { Start Location `json:"start"` // Start of range to search possible breakpoint locations in. End *Location `json:"end,omitempty"` // End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. RestrictToFunction *bool `json:"restrictToFunction,omitempty"` // Only consider locations which are in the same (non-nested) function as start. }
GetPossibleBreakpointsArgs represents the arguments for GetPossibleBreakpoints in the Debugger domain.
func NewGetPossibleBreakpointsArgs ¶
func NewGetPossibleBreakpointsArgs(start Location) *GetPossibleBreakpointsArgs
NewGetPossibleBreakpointsArgs initializes GetPossibleBreakpointsArgs with the required arguments.
func (*GetPossibleBreakpointsArgs) SetEnd ¶
func (a *GetPossibleBreakpointsArgs) SetEnd(end Location) *GetPossibleBreakpointsArgs
SetEnd sets the End optional argument. End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
func (*GetPossibleBreakpointsArgs) SetRestrictToFunction ¶
func (a *GetPossibleBreakpointsArgs) SetRestrictToFunction(restrictToFunction bool) *GetPossibleBreakpointsArgs
SetRestrictToFunction sets the RestrictToFunction optional argument. Only consider locations which are in the same (non-nested) function as start.
type GetPossibleBreakpointsReply ¶
type GetPossibleBreakpointsReply struct {
Locations []BreakLocation `json:"locations"` // List of the possible breakpoint locations.
}
GetPossibleBreakpointsReply represents the return values for GetPossibleBreakpoints in the Debugger domain.
type GetScriptSourceArgs ¶
type GetScriptSourceArgs struct {
ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to get source for.
}
GetScriptSourceArgs represents the arguments for GetScriptSource in the Debugger domain.
func NewGetScriptSourceArgs ¶
func NewGetScriptSourceArgs(scriptID runtime.ScriptID) *GetScriptSourceArgs
NewGetScriptSourceArgs initializes GetScriptSourceArgs with the required arguments.
type GetScriptSourceReply ¶
type GetScriptSourceReply struct { ScriptSource string `json:"scriptSource"` // Script source (empty in case of Wasm bytecode). Bytecode []byte `json:"bytecode,omitempty"` // Wasm bytecode. (Encoded as a base64 string when passed over JSON) }
GetScriptSourceReply represents the return values for GetScriptSource in the Debugger domain.
type GetStackTraceArgs ¶ added in v0.15.2
type GetStackTraceArgs struct {
StackTraceID runtime.StackTraceID `json:"stackTraceId"` // No description.
}
GetStackTraceArgs represents the arguments for GetStackTrace in the Debugger domain.
func NewGetStackTraceArgs ¶ added in v0.15.2
func NewGetStackTraceArgs(stackTraceID runtime.StackTraceID) *GetStackTraceArgs
NewGetStackTraceArgs initializes GetStackTraceArgs with the required arguments.
type GetStackTraceReply ¶ added in v0.15.2
type GetStackTraceReply struct {
StackTrace runtime.StackTrace `json:"stackTrace"` // No description.
}
GetStackTraceReply represents the return values for GetStackTrace in the Debugger domain.
type GetWasmBytecodeArgs ¶ added in v0.25.0
type GetWasmBytecodeArgs struct {
ScriptID runtime.ScriptID `json:"scriptId"` // Id of the Wasm script to get source for.
}
GetWasmBytecodeArgs represents the arguments for GetWasmBytecode in the Debugger domain.
func NewGetWasmBytecodeArgs ¶ added in v0.25.0
func NewGetWasmBytecodeArgs(scriptID runtime.ScriptID) *GetWasmBytecodeArgs
NewGetWasmBytecodeArgs initializes GetWasmBytecodeArgs with the required arguments.
type GetWasmBytecodeReply ¶ added in v0.25.0
type GetWasmBytecodeReply struct {
Bytecode []byte `json:"bytecode"` // Script source. (Encoded as a base64 string when passed over JSON)
}
GetWasmBytecodeReply represents the return values for GetWasmBytecode in the Debugger domain.
type Location ¶
type Location struct { ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the `Debugger.scriptParsed`. LineNumber int `json:"lineNumber"` // Line number in the script (0-based). ColumnNumber *int `json:"columnNumber,omitempty"` // Column number in the script (0-based). }
Location Location in the source code.
type LocationRange ¶ added in v0.31.0
type LocationRange struct { ScriptID runtime.ScriptID `json:"scriptId"` // No description. Start ScriptPosition `json:"start"` // No description. End ScriptPosition `json:"end"` // No description. }
LocationRange Location range within one script.
Note: This type is experimental.
type PauseOnAsyncCallArgs ¶ added in v0.15.2
type PauseOnAsyncCallArgs struct {
ParentStackTraceID runtime.StackTraceID `json:"parentStackTraceId"` // Debugger will pause when async call with given stack trace is started.
}
PauseOnAsyncCallArgs represents the arguments for PauseOnAsyncCall in the Debugger domain.
func NewPauseOnAsyncCallArgs ¶ added in v0.15.2
func NewPauseOnAsyncCallArgs(parentStackTraceID runtime.StackTraceID) *PauseOnAsyncCallArgs
NewPauseOnAsyncCallArgs initializes PauseOnAsyncCallArgs with the required arguments.
type PausedClient ¶
type PausedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*PausedReply, error) rpcc.Stream }
PausedClient is a client for Paused events. Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
type PausedReply ¶
type PausedReply struct { CallFrames []CallFrame `json:"callFrames"` // Call stack the virtual machine stopped on. // Reason Pause reason. // // Values: "ambiguous", "assert", "CSPViolation", "debugCommand", "DOM", "EventListener", "exception", "instrumentation", "OOM", "other", "promiseRejection", "XHR". Reason string `json:"reason"` Data json.RawMessage `json:"data,omitempty"` // Object containing break-specific auxiliary properties. HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any. // AsyncStackTraceID Async stack trace, if any. // // Note: This property is experimental. AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // AsyncCallStackTraceID is deprecated. // // Deprecated: Never present, will be removed. // // Note: This property is experimental. AsyncCallStackTraceID *runtime.StackTraceID `json:"asyncCallStackTraceId,omitempty"` }
PausedReply is the reply for Paused events.
type RemoveBreakpointArgs ¶
type RemoveBreakpointArgs struct {
BreakpointID BreakpointID `json:"breakpointId"` // No description.
}
RemoveBreakpointArgs represents the arguments for RemoveBreakpoint in the Debugger domain.
func NewRemoveBreakpointArgs ¶
func NewRemoveBreakpointArgs(breakpointID BreakpointID) *RemoveBreakpointArgs
NewRemoveBreakpointArgs initializes RemoveBreakpointArgs with the required arguments.
type RestartFrameArgs ¶
type RestartFrameArgs struct {
CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier to evaluate on.
}
RestartFrameArgs represents the arguments for RestartFrame in the Debugger domain.
func NewRestartFrameArgs ¶
func NewRestartFrameArgs(callFrameID CallFrameID) *RestartFrameArgs
NewRestartFrameArgs initializes RestartFrameArgs with the required arguments.
type RestartFrameReply ¶
type RestartFrameReply struct { CallFrames []CallFrame `json:"callFrames"` // New stack trace. AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any. // AsyncStackTraceID Async stack trace, if any. // // Note: This property is experimental. AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` }
RestartFrameReply represents the return values for RestartFrame in the Debugger domain.
type ResumeArgs ¶ added in v0.26.0
type ResumeArgs struct {
TerminateOnResume *bool `json:"terminateOnResume,omitempty"` // Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
}
ResumeArgs represents the arguments for Resume in the Debugger domain.
func NewResumeArgs ¶ added in v0.26.0
func NewResumeArgs() *ResumeArgs
NewResumeArgs initializes ResumeArgs with the required arguments.
func (*ResumeArgs) SetTerminateOnResume ¶ added in v0.26.0
func (a *ResumeArgs) SetTerminateOnResume(terminateOnResume bool) *ResumeArgs
SetTerminateOnResume sets the TerminateOnResume optional argument. Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
type ResumedClient ¶
type ResumedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResumedReply, error) rpcc.Stream }
ResumedClient is a client for Resumed events. Fired when the virtual machine resumed execution.
type Scope ¶
type Scope struct { // Type Scope type. // // Values: "global", "local", "with", "closure", "catch", "block", "script", "eval", "module", "wasm-expression-stack". Type string `json:"type"` Object runtime.RemoteObject `json:"object"` // Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. Name *string `json:"name,omitempty"` // No description. StartLocation *Location `json:"startLocation,omitempty"` // Location in the source code where scope starts EndLocation *Location `json:"endLocation,omitempty"` // Location in the source code where scope ends }
Scope Scope description.
type ScriptFailedToParseClient ¶
type ScriptFailedToParseClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ScriptFailedToParseReply, error) rpcc.Stream }
ScriptFailedToParseClient is a client for ScriptFailedToParse events. Fired when virtual machine fails to parse the script.
type ScriptFailedToParseReply ¶
type ScriptFailedToParseReply struct { ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed. URL string `json:"url"` // URL or name of the script parsed (if any). StartLine int `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags). StartColumn int `json:"startColumn"` // Column offset of the script within the resource with given URL. EndLine int `json:"endLine"` // Last line of the script. EndColumn int `json:"endColumn"` // Length of the last line of the script. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context. Hash string `json:"hash"` // Content hash of the script. ExecutionContextAuxData json.RawMessage `json:"executionContextAuxData,omitempty"` // Embedder-specific auxiliary data. SourceMapURL *string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any). HasSourceURL *bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL. IsModule *bool `json:"isModule,omitempty"` // True, if this script is ES6 module. Length *int `json:"length,omitempty"` // This script length. // StackTrace JavaScript top stack frame of where the script parsed // event was triggered if available. // // Note: This property is experimental. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // CodeOffset If the scriptLanguage is WebAssembly, the code section // offset in the module. // // Note: This property is experimental. CodeOffset *int `json:"codeOffset,omitempty"` // ScriptLanguage The language of the script. // // Note: This property is experimental. ScriptLanguage ScriptLanguage `json:"scriptLanguage,omitempty"` // EmbedderName The name the embedder supplied for this script. // // Note: This property is experimental. EmbedderName *string `json:"embedderName,omitempty"` }
ScriptFailedToParseReply is the reply for ScriptFailedToParse events.
type ScriptLanguage ¶ added in v0.26.0
type ScriptLanguage string
ScriptLanguage Enum of possible script languages.
const ( ScriptLanguageNotSet ScriptLanguage = "" ScriptLanguageJavaScript ScriptLanguage = "JavaScript" ScriptLanguageWebAssembly ScriptLanguage = "WebAssembly" )
ScriptLanguage as enums.
func (ScriptLanguage) String ¶ added in v0.26.0
func (e ScriptLanguage) String() string
func (ScriptLanguage) Valid ¶ added in v0.26.0
func (e ScriptLanguage) Valid() bool
type ScriptParsedClient ¶
type ScriptParsedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ScriptParsedReply, error) rpcc.Stream }
ScriptParsedClient is a client for ScriptParsed events. Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
type ScriptParsedReply ¶
type ScriptParsedReply struct { ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed. URL string `json:"url"` // URL or name of the script parsed (if any). StartLine int `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags). StartColumn int `json:"startColumn"` // Column offset of the script within the resource with given URL. EndLine int `json:"endLine"` // Last line of the script. EndColumn int `json:"endColumn"` // Length of the last line of the script. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context. Hash string `json:"hash"` // Content hash of the script. ExecutionContextAuxData json.RawMessage `json:"executionContextAuxData,omitempty"` // Embedder-specific auxiliary data. // IsLiveEdit True, if this script is generated as a result of the // live edit operation. // // Note: This property is experimental. IsLiveEdit *bool `json:"isLiveEdit,omitempty"` SourceMapURL *string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any). HasSourceURL *bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL. IsModule *bool `json:"isModule,omitempty"` // True, if this script is ES6 module. Length *int `json:"length,omitempty"` // This script length. // StackTrace JavaScript top stack frame of where the script parsed // event was triggered if available. // // Note: This property is experimental. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // CodeOffset If the scriptLanguage is WebAssembly, the code section // offset in the module. // // Note: This property is experimental. CodeOffset *int `json:"codeOffset,omitempty"` // ScriptLanguage The language of the script. // // Note: This property is experimental. ScriptLanguage ScriptLanguage `json:"scriptLanguage,omitempty"` // DebugSymbols If the scriptLanguage is WebASsembly, the source of // debug symbols for the module. // // Note: This property is experimental. DebugSymbols *DebugSymbols `json:"debugSymbols,omitempty"` // EmbedderName The name the embedder supplied for this script. // // Note: This property is experimental. EmbedderName *string `json:"embedderName,omitempty"` }
ScriptParsedReply is the reply for ScriptParsed events.
type ScriptPosition ¶
type ScriptPosition struct { LineNumber int `json:"lineNumber"` // No description. ColumnNumber int `json:"columnNumber"` // No description. }
ScriptPosition Location in the source code.
Note: This type is experimental.
type SearchInContentArgs ¶
type SearchInContentArgs struct { ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to search in. Query string `json:"query"` // String to search for. CaseSensitive *bool `json:"caseSensitive,omitempty"` // If true, search is case sensitive. IsRegex *bool `json:"isRegex,omitempty"` // If true, treats string parameter as regex. }
SearchInContentArgs represents the arguments for SearchInContent in the Debugger domain.
func NewSearchInContentArgs ¶
func NewSearchInContentArgs(scriptID runtime.ScriptID, query string) *SearchInContentArgs
NewSearchInContentArgs initializes SearchInContentArgs with the required arguments.
func (*SearchInContentArgs) SetCaseSensitive ¶
func (a *SearchInContentArgs) SetCaseSensitive(caseSensitive bool) *SearchInContentArgs
SetCaseSensitive sets the CaseSensitive optional argument. If true, search is case sensitive.
func (*SearchInContentArgs) SetIsRegex ¶
func (a *SearchInContentArgs) SetIsRegex(isRegex bool) *SearchInContentArgs
SetIsRegex sets the IsRegex optional argument. If true, treats string parameter as regex.
type SearchInContentReply ¶
type SearchInContentReply struct {
Result []SearchMatch `json:"result"` // List of search matches.
}
SearchInContentReply represents the return values for SearchInContent in the Debugger domain.
type SearchMatch ¶
type SearchMatch struct { LineNumber float64 `json:"lineNumber"` // Line number in resource content. LineContent string `json:"lineContent"` // Line with match content. }
SearchMatch Search match for resource.
type SetAsyncCallStackDepthArgs ¶
type SetAsyncCallStackDepthArgs struct {
MaxDepth int `json:"maxDepth"` // Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).
}
SetAsyncCallStackDepthArgs represents the arguments for SetAsyncCallStackDepth in the Debugger domain.
func NewSetAsyncCallStackDepthArgs ¶
func NewSetAsyncCallStackDepthArgs(maxDepth int) *SetAsyncCallStackDepthArgs
NewSetAsyncCallStackDepthArgs initializes SetAsyncCallStackDepthArgs with the required arguments.
type SetBlackboxPatternsArgs ¶
type SetBlackboxPatternsArgs struct {
Patterns []string `json:"patterns"` // Array of regexps that will be used to check script url for blackbox state.
}
SetBlackboxPatternsArgs represents the arguments for SetBlackboxPatterns in the Debugger domain.
func NewSetBlackboxPatternsArgs ¶
func NewSetBlackboxPatternsArgs(patterns []string) *SetBlackboxPatternsArgs
NewSetBlackboxPatternsArgs initializes SetBlackboxPatternsArgs with the required arguments.
type SetBlackboxedRangesArgs ¶
type SetBlackboxedRangesArgs struct { ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script. Positions []ScriptPosition `json:"positions"` // No description. }
SetBlackboxedRangesArgs represents the arguments for SetBlackboxedRanges in the Debugger domain.
func NewSetBlackboxedRangesArgs ¶
func NewSetBlackboxedRangesArgs(scriptID runtime.ScriptID, positions []ScriptPosition) *SetBlackboxedRangesArgs
NewSetBlackboxedRangesArgs initializes SetBlackboxedRangesArgs with the required arguments.
type SetBreakpointArgs ¶
type SetBreakpointArgs struct { Location Location `json:"location"` // Location to set breakpoint in. Condition *string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. }
SetBreakpointArgs represents the arguments for SetBreakpoint in the Debugger domain.
func NewSetBreakpointArgs ¶
func NewSetBreakpointArgs(location Location) *SetBreakpointArgs
NewSetBreakpointArgs initializes SetBreakpointArgs with the required arguments.
func (*SetBreakpointArgs) SetCondition ¶
func (a *SetBreakpointArgs) SetCondition(condition string) *SetBreakpointArgs
SetCondition sets the Condition optional argument. Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
type SetBreakpointByURLArgs ¶
type SetBreakpointByURLArgs struct { LineNumber int `json:"lineNumber"` // Line number to set breakpoint at. URL *string `json:"url,omitempty"` // URL of the resources to set breakpoint on. URLRegex *string `json:"urlRegex,omitempty"` // Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified. ScriptHash *string `json:"scriptHash,omitempty"` // Script hash of the resources to set breakpoint on. ColumnNumber *int `json:"columnNumber,omitempty"` // Offset in the line to set breakpoint at. Condition *string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. }
SetBreakpointByURLArgs represents the arguments for SetBreakpointByURL in the Debugger domain.
func NewSetBreakpointByURLArgs ¶
func NewSetBreakpointByURLArgs(lineNumber int) *SetBreakpointByURLArgs
NewSetBreakpointByURLArgs initializes SetBreakpointByURLArgs with the required arguments.
func (*SetBreakpointByURLArgs) SetColumnNumber ¶
func (a *SetBreakpointByURLArgs) SetColumnNumber(columnNumber int) *SetBreakpointByURLArgs
SetColumnNumber sets the ColumnNumber optional argument. Offset in the line to set breakpoint at.
func (*SetBreakpointByURLArgs) SetCondition ¶
func (a *SetBreakpointByURLArgs) SetCondition(condition string) *SetBreakpointByURLArgs
SetCondition sets the Condition optional argument. Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
func (*SetBreakpointByURLArgs) SetScriptHash ¶ added in v0.14.1
func (a *SetBreakpointByURLArgs) SetScriptHash(scriptHash string) *SetBreakpointByURLArgs
SetScriptHash sets the ScriptHash optional argument. Script hash of the resources to set breakpoint on.
func (*SetBreakpointByURLArgs) SetURL ¶
func (a *SetBreakpointByURLArgs) SetURL(url string) *SetBreakpointByURLArgs
SetURL sets the URL optional argument. URL of the resources to set breakpoint on.
func (*SetBreakpointByURLArgs) SetURLRegex ¶
func (a *SetBreakpointByURLArgs) SetURLRegex(urlRegex string) *SetBreakpointByURLArgs
SetURLRegex sets the URLRegex optional argument. Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified.
type SetBreakpointByURLReply ¶
type SetBreakpointByURLReply struct { BreakpointID BreakpointID `json:"breakpointId"` // Id of the created breakpoint for further reference. Locations []Location `json:"locations"` // List of the locations this breakpoint resolved into upon addition. }
SetBreakpointByURLReply represents the return values for SetBreakpointByURL in the Debugger domain.
type SetBreakpointOnFunctionCallArgs ¶ added in v0.18.1
type SetBreakpointOnFunctionCallArgs struct { ObjectID runtime.RemoteObjectID `json:"objectId"` // Function object id. Condition *string `json:"condition,omitempty"` // Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true. }
SetBreakpointOnFunctionCallArgs represents the arguments for SetBreakpointOnFunctionCall in the Debugger domain.
func NewSetBreakpointOnFunctionCallArgs ¶ added in v0.18.1
func NewSetBreakpointOnFunctionCallArgs(objectID runtime.RemoteObjectID) *SetBreakpointOnFunctionCallArgs
NewSetBreakpointOnFunctionCallArgs initializes SetBreakpointOnFunctionCallArgs with the required arguments.
func (*SetBreakpointOnFunctionCallArgs) SetCondition ¶ added in v0.18.1
func (a *SetBreakpointOnFunctionCallArgs) SetCondition(condition string) *SetBreakpointOnFunctionCallArgs
SetCondition sets the Condition optional argument. Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
type SetBreakpointOnFunctionCallReply ¶ added in v0.18.1
type SetBreakpointOnFunctionCallReply struct {
BreakpointID BreakpointID `json:"breakpointId"` // Id of the created breakpoint for further reference.
}
SetBreakpointOnFunctionCallReply represents the return values for SetBreakpointOnFunctionCall in the Debugger domain.
type SetBreakpointReply ¶
type SetBreakpointReply struct { BreakpointID BreakpointID `json:"breakpointId"` // Id of the created breakpoint for further reference. ActualLocation Location `json:"actualLocation"` // Location this breakpoint resolved into. }
SetBreakpointReply represents the return values for SetBreakpoint in the Debugger domain.
type SetBreakpointsActiveArgs ¶
type SetBreakpointsActiveArgs struct {
Active bool `json:"active"` // New value for breakpoints active state.
}
SetBreakpointsActiveArgs represents the arguments for SetBreakpointsActive in the Debugger domain.
func NewSetBreakpointsActiveArgs ¶
func NewSetBreakpointsActiveArgs(active bool) *SetBreakpointsActiveArgs
NewSetBreakpointsActiveArgs initializes SetBreakpointsActiveArgs with the required arguments.
type SetInstrumentationBreakpointArgs ¶ added in v0.23.2
type SetInstrumentationBreakpointArgs struct { // Instrumentation Instrumentation name. // // Values: "beforeScriptExecution", "beforeScriptWithSourceMapExecution". Instrumentation string `json:"instrumentation"` }
SetInstrumentationBreakpointArgs represents the arguments for SetInstrumentationBreakpoint in the Debugger domain.
func NewSetInstrumentationBreakpointArgs ¶ added in v0.23.2
func NewSetInstrumentationBreakpointArgs(instrumentation string) *SetInstrumentationBreakpointArgs
NewSetInstrumentationBreakpointArgs initializes SetInstrumentationBreakpointArgs with the required arguments.
type SetInstrumentationBreakpointReply ¶ added in v0.23.2
type SetInstrumentationBreakpointReply struct {
BreakpointID BreakpointID `json:"breakpointId"` // Id of the created breakpoint for further reference.
}
SetInstrumentationBreakpointReply represents the return values for SetInstrumentationBreakpoint in the Debugger domain.
type SetPauseOnExceptionsArgs ¶
type SetPauseOnExceptionsArgs struct { // State Pause on exceptions mode. // // Values: "none", "uncaught", "all". State string `json:"state"` }
SetPauseOnExceptionsArgs represents the arguments for SetPauseOnExceptions in the Debugger domain.
func NewSetPauseOnExceptionsArgs ¶
func NewSetPauseOnExceptionsArgs(state string) *SetPauseOnExceptionsArgs
NewSetPauseOnExceptionsArgs initializes SetPauseOnExceptionsArgs with the required arguments.
type SetReturnValueArgs ¶ added in v0.14.2
type SetReturnValueArgs struct {
NewValue runtime.CallArgument `json:"newValue"` // New return value.
}
SetReturnValueArgs represents the arguments for SetReturnValue in the Debugger domain.
func NewSetReturnValueArgs ¶ added in v0.14.2
func NewSetReturnValueArgs(newValue runtime.CallArgument) *SetReturnValueArgs
NewSetReturnValueArgs initializes SetReturnValueArgs with the required arguments.
type SetScriptSourceArgs ¶
type SetScriptSourceArgs struct { ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to edit. ScriptSource string `json:"scriptSource"` // New content of the script. DryRun *bool `json:"dryRun,omitempty"` // If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. }
SetScriptSourceArgs represents the arguments for SetScriptSource in the Debugger domain.
func NewSetScriptSourceArgs ¶
func NewSetScriptSourceArgs(scriptID runtime.ScriptID, scriptSource string) *SetScriptSourceArgs
NewSetScriptSourceArgs initializes SetScriptSourceArgs with the required arguments.
func (*SetScriptSourceArgs) SetDryRun ¶
func (a *SetScriptSourceArgs) SetDryRun(dryRun bool) *SetScriptSourceArgs
SetDryRun sets the DryRun optional argument. If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
type SetScriptSourceReply ¶
type SetScriptSourceReply struct { CallFrames []CallFrame `json:"callFrames,omitempty"` // New stack trace in case editing has happened while VM was stopped. StackChanged *bool `json:"stackChanged,omitempty"` // Whether current call stack was modified after applying the changes. AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any. // AsyncStackTraceID Async stack trace, if any. // // Note: This property is experimental. AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` ExceptionDetails *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details if any. }
SetScriptSourceReply represents the return values for SetScriptSource in the Debugger domain.
type SetSkipAllPausesArgs ¶
type SetSkipAllPausesArgs struct {
Skip bool `json:"skip"` // New value for skip pauses state.
}
SetSkipAllPausesArgs represents the arguments for SetSkipAllPauses in the Debugger domain.
func NewSetSkipAllPausesArgs ¶
func NewSetSkipAllPausesArgs(skip bool) *SetSkipAllPausesArgs
NewSetSkipAllPausesArgs initializes SetSkipAllPausesArgs with the required arguments.
type SetVariableValueArgs ¶
type SetVariableValueArgs struct { ScopeNumber int `json:"scopeNumber"` // 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. VariableName string `json:"variableName"` // Variable name. NewValue runtime.CallArgument `json:"newValue"` // New variable value. CallFrameID CallFrameID `json:"callFrameId"` // Id of callframe that holds variable. }
SetVariableValueArgs represents the arguments for SetVariableValue in the Debugger domain.
func NewSetVariableValueArgs ¶
func NewSetVariableValueArgs(scopeNumber int, variableName string, newValue runtime.CallArgument, callFrameID CallFrameID) *SetVariableValueArgs
NewSetVariableValueArgs initializes SetVariableValueArgs with the required arguments.
type StepIntoArgs ¶ added in v0.14.2
type StepIntoArgs struct { // BreakOnAsyncCall Debugger will pause on the execution of the first // async task which was scheduled before next pause. // // Note: This property is experimental. BreakOnAsyncCall *bool `json:"breakOnAsyncCall,omitempty"` // SkipList The skipList specifies location ranges that should be // skipped on step into. // // Note: This property is experimental. SkipList []LocationRange `json:"skipList,omitempty"` }
StepIntoArgs represents the arguments for StepInto in the Debugger domain.
func NewStepIntoArgs ¶ added in v0.14.2
func NewStepIntoArgs() *StepIntoArgs
NewStepIntoArgs initializes StepIntoArgs with the required arguments.
func (*StepIntoArgs) SetBreakOnAsyncCall ¶ added in v0.14.2
func (a *StepIntoArgs) SetBreakOnAsyncCall(breakOnAsyncCall bool) *StepIntoArgs
SetBreakOnAsyncCall sets the BreakOnAsyncCall optional argument. Debugger will pause on the execution of the first async task which was scheduled before next pause.
Note: This property is experimental.
func (*StepIntoArgs) SetSkipList ¶ added in v0.31.0
func (a *StepIntoArgs) SetSkipList(skipList []LocationRange) *StepIntoArgs
SetSkipList sets the SkipList optional argument. The skipList specifies location ranges that should be skipped on step into.
Note: This property is experimental.
type StepOverArgs ¶ added in v0.31.0
type StepOverArgs struct { // SkipList The skipList specifies location ranges that should be // skipped on step over. // // Note: This property is experimental. SkipList []LocationRange `json:"skipList,omitempty"` }
StepOverArgs represents the arguments for StepOver in the Debugger domain.
func NewStepOverArgs ¶ added in v0.31.0
func NewStepOverArgs() *StepOverArgs
NewStepOverArgs initializes StepOverArgs with the required arguments.
func (*StepOverArgs) SetSkipList ¶ added in v0.31.0
func (a *StepOverArgs) SetSkipList(skipList []LocationRange) *StepOverArgs
SetSkipList sets the SkipList optional argument. The skipList specifies location ranges that should be skipped on step over.
Note: This property is experimental.