debugger

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2017 License: MIT Imports: 5 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the Debugger domain with the connection set to conn.

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

Note: This type is experimental.

type BreakpointID

type BreakpointID string

BreakpointID Breakpoint identifier.

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 in the source code.
	//
	// Note: This property is experimental.
	FunctionLocation *Location             `json:"functionLocation,omitempty"`
	Location         Location              `json:"location"`              // Location in the source code.
	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 CallFrameID

type CallFrameID string

CallFrameID Call frame identifier.

type ContinueToLocationArgs

type ContinueToLocationArgs struct {
	Location Location `json:"location"` // Location to continue to.
	// TargetCallFrames
	//
	// Values: "any", "current".
	//
	// Note: This property is experimental.
	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".

Note: This argument is experimental.

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 Whether to throw an exception if side effect cannot be ruled out during evaluation.
	//
	// Note: This property is experimental.
	ThrowOnSideEffect *bool `json:"throwOnSideEffect,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 argument 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

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.

Note: This argument 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

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.
}

GetScriptSourceReply represents the return values for GetScriptSource 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 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: "XHR", "DOM", "EventListener", "exception", "assert", "debugCommand", "promiseRejection", "OOM", "other", "ambiguous".
	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.
}

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.
}

RestartFrameReply represents the return values for RestartFrame in the Debugger domain.

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 ResumedReply

type ResumedReply struct{}

ResumedReply is the reply for Resumed events.

type Scope

type Scope struct {
	// Type Scope type.
	//
	// Values: "global", "local", "with", "closure", "catch", "block", "script", "eval", "module".
	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 True, if this script has sourceURL.
	//
	// Note: This property is experimental.
	HasSourceURL *bool `json:"hasSourceURL,omitempty"`
	// IsModule True, if this script is ES6 module.
	//
	// Note: This property is experimental.
	IsModule *bool `json:"isModule,omitempty"`
	// Length This script length.
	//
	// Note: This property is experimental.
	Length *int `json:"length,omitempty"`
	// 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"`
}

ScriptFailedToParseReply is the reply for ScriptFailedToParse events.

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 True, if this script has sourceURL.
	//
	// Note: This property is experimental.
	HasSourceURL *bool `json:"hasSourceURL,omitempty"`
	// IsModule True, if this script is ES6 module.
	//
	// Note: This property is experimental.
	IsModule *bool `json:"isModule,omitempty"`
	// Length This script length.
	//
	// Note: This property is experimental.
	Length *int `json:"length,omitempty"`
	// 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"`
}

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.

Note: This type is experimental.

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.
	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) SetURL

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 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 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 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.
	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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL