func (c *Debugger) SetScriptSource(scriptId string, scriptSource string, dryRun bool) ([]*DebuggerCallFrame, bool, *RuntimeStackTrace, *RuntimeStackTraceId, *RuntimeExceptionDetails, error) {
	var v DebuggerSetScriptSourceParams
	v.ScriptId = scriptId
	v.ScriptSource = scriptSource
	v.DryRun = dryRun
	return c.SetScriptSourceWithParams(&v)
}
SetScriptSource - Edits JavaScript source live.
scriptId - Id of the script to edit.
scriptSource - New content of the script.
dryRun - If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
Returns -  callFrames - New stack trace in case editing has happened while VM was stopped. stackChanged - Whether current call stack  was modified after applying the changes. asyncStackTrace - Async stack trace, if any. asyncStackTraceId - Async stack trace, if any. exceptionDetails - Exception details if any.
package gcdapi
import (
	"encoding/json"
	"github.com/wirepair/gcd/gcdmessage"
)
type DebuggerLocation struct {
	ScriptId     string `json:"scriptId"`                
	LineNumber   int    `json:"lineNumber"`              
	ColumnNumber int    `json:"columnNumber,omitempty"`  
}
type DebuggerScriptPosition struct {
	LineNumber   int `json:"lineNumber"`    
	ColumnNumber int `json:"columnNumber"`  
}
type DebuggerCallFrame struct {
	CallFrameId      string               `json:"callFrameId"`                 
	FunctionName     string               `json:"functionName"`                
	FunctionLocation *DebuggerLocation    `json:"functionLocation,omitempty"`  
	Location         *DebuggerLocation    `json:"location"`                    
	Url              string               `json:"url"`                         
	ScopeChain       []*DebuggerScope     `json:"scopeChain"`                  
	This             *RuntimeRemoteObject `json:"this"`                        
	ReturnValue      *RuntimeRemoteObject `json:"returnValue,omitempty"`       
}
type DebuggerScope struct {
	Type          string               `json:"type"`                     
	Object        *RuntimeRemoteObject `json:"object"`                   
	Name          string               `json:"name,omitempty"`           
	StartLocation *DebuggerLocation    `json:"startLocation,omitempty"`  
	EndLocation   *DebuggerLocation    `json:"endLocation,omitempty"`    
}
type DebuggerSearchMatch struct {
	LineNumber  float64 `json:"lineNumber"`   
	LineContent string  `json:"lineContent"`  
}
type DebuggerBreakLocation struct {
	ScriptId     string `json:"scriptId"`                
	LineNumber   int    `json:"lineNumber"`              
	ColumnNumber int    `json:"columnNumber,omitempty"`  
	Type         string `json:"type,omitempty"`          
}
type DebuggerBreakpointResolvedEvent struct {
	Method string `json:"method"`
	Params struct {
		BreakpointId string            `json:"breakpointId"`  
		Location     *DebuggerLocation `json:"location"`      
	} `json:"Params,omitempty"`
}
type DebuggerPausedEvent struct {
	Method string `json:"method"`
	Params struct {
		CallFrames            []*DebuggerCallFrame   `json:"callFrames"`                       
		Reason                string                 `json:"reason"`                           
		Data                  map[string]interface{} `json:"data,omitempty"`                   
		HitBreakpoints        []string               `json:"hitBreakpoints,omitempty"`         
		AsyncStackTrace       *RuntimeStackTrace     `json:"asyncStackTrace,omitempty"`        
		AsyncStackTraceId     *RuntimeStackTraceId   `json:"asyncStackTraceId,omitempty"`      
		AsyncCallStackTraceId *RuntimeStackTraceId   `json:"asyncCallStackTraceId,omitempty"`  
	} `json:"Params,omitempty"`
}
type DebuggerScriptFailedToParseEvent struct {
	Method string `json:"method"`
	Params struct {
		ScriptId                string                 `json:"scriptId"`                           
		Url                     string                 `json:"url"`                                
		StartLine               int                    `json:"startLine"`                          
		StartColumn             int                    `json:"startColumn"`                        
		EndLine                 int                    `json:"endLine"`                            
		EndColumn               int                    `json:"endColumn"`                          
		ExecutionContextId      int                    `json:"executionContextId"`                 
		Hash                    string                 `json:"hash"`                               
		ExecutionContextAuxData map[string]interface{} `json:"executionContextAuxData,omitempty"`  
		SourceMapURL            string                 `json:"sourceMapURL,omitempty"`             
		HasSourceURL            bool                   `json:"hasSourceURL,omitempty"`             
		IsModule                bool                   `json:"isModule,omitempty"`                 
		Length                  int                    `json:"length,omitempty"`                   
		StackTrace              *RuntimeStackTrace     `json:"stackTrace,omitempty"`               
	} `json:"Params,omitempty"`
}
type DebuggerScriptParsedEvent struct {
	Method string `json:"method"`
	Params struct {
		ScriptId                string                 `json:"scriptId"`                           
		Url                     string                 `json:"url"`                                
		StartLine               int                    `json:"startLine"`                          
		StartColumn             int                    `json:"startColumn"`                        
		EndLine                 int                    `json:"endLine"`                            
		EndColumn               int                    `json:"endColumn"`                          
		ExecutionContextId      int                    `json:"executionContextId"`                 
		Hash                    string                 `json:"hash"`                               
		ExecutionContextAuxData map[string]interface{} `json:"executionContextAuxData,omitempty"`  
		IsLiveEdit              bool                   `json:"isLiveEdit,omitempty"`               
		SourceMapURL            string                 `json:"sourceMapURL,omitempty"`             
		HasSourceURL            bool                   `json:"hasSourceURL,omitempty"`             
		IsModule                bool                   `json:"isModule,omitempty"`                 
		Length                  int                    `json:"length,omitempty"`                   
		StackTrace              *RuntimeStackTrace     `json:"stackTrace,omitempty"`               
	} `json:"Params,omitempty"`
}
type Debugger struct {
	target gcdmessage.ChromeTargeter
}
func NewDebugger(target gcdmessage.ChromeTargeter) *Debugger {
	c := &Debugger{target: target}
	return c
}
type DebuggerContinueToLocationParams struct {
	Location *DebuggerLocation `json:"location"`
	TargetCallFrames string `json:"targetCallFrames,omitempty"`
}
func (c *Debugger) ContinueToLocationWithParams(v *DebuggerContinueToLocationParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.continueToLocation", Params: v})
}
func (c *Debugger) ContinueToLocation(location *DebuggerLocation, targetCallFrames string) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerContinueToLocationParams
	v.Location = location
	v.TargetCallFrames = targetCallFrames
	return c.ContinueToLocationWithParams(&v)
}
func (c *Debugger) Disable() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.disable"})
}
func (c *Debugger) Enable() (string, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.enable"})
	if err != nil {
		return "", err
	}
	var chromeData struct {
		Result struct {
			DebuggerId string
		}
	}
	if resp == nil {
		return "", &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", err
	}
	return chromeData.Result.DebuggerId, nil
}
type DebuggerEvaluateOnCallFrameParams struct {
	CallFrameId string `json:"callFrameId"`
	Expression string `json:"expression"`
	ObjectGroup string `json:"objectGroup,omitempty"`
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`
	Silent bool `json:"silent,omitempty"`
	ReturnByValue bool `json:"returnByValue,omitempty"`
	GeneratePreview bool `json:"generatePreview,omitempty"`
	ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"`
	Timeout float64 `json:"timeout,omitempty"`
}
func (c *Debugger) EvaluateOnCallFrameWithParams(v *DebuggerEvaluateOnCallFrameParams) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.evaluateOnCallFrame", Params: v})
	if err != nil {
		return nil, nil, err
	}
	var chromeData struct {
		Result struct {
			Result           *RuntimeRemoteObject
			ExceptionDetails *RuntimeExceptionDetails
		}
	}
	if resp == nil {
		return nil, nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, nil, err
	}
	return chromeData.Result.Result, chromeData.Result.ExceptionDetails, nil
}
func (c *Debugger) EvaluateOnCallFrame(callFrameId string, expression string, objectGroup string, includeCommandLineAPI bool, silent bool, returnByValue bool, generatePreview bool, throwOnSideEffect bool, timeout float64) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error) {
	var v DebuggerEvaluateOnCallFrameParams
	v.CallFrameId = callFrameId
	v.Expression = expression
	v.ObjectGroup = objectGroup
	v.IncludeCommandLineAPI = includeCommandLineAPI
	v.Silent = silent
	v.ReturnByValue = returnByValue
	v.GeneratePreview = generatePreview
	v.ThrowOnSideEffect = throwOnSideEffect
	v.Timeout = timeout
	return c.EvaluateOnCallFrameWithParams(&v)
}
type DebuggerGetPossibleBreakpointsParams struct {
	Start *DebuggerLocation `json:"start"`
	End *DebuggerLocation `json:"end,omitempty"`
	RestrictToFunction bool `json:"restrictToFunction,omitempty"`
}
func (c *Debugger) GetPossibleBreakpointsWithParams(v *DebuggerGetPossibleBreakpointsParams) ([]*DebuggerBreakLocation, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.getPossibleBreakpoints", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Locations []*DebuggerBreakLocation
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Locations, nil
}
func (c *Debugger) GetPossibleBreakpoints(start *DebuggerLocation, end *DebuggerLocation, restrictToFunction bool) ([]*DebuggerBreakLocation, error) {
	var v DebuggerGetPossibleBreakpointsParams
	v.Start = start
	v.End = end
	v.RestrictToFunction = restrictToFunction
	return c.GetPossibleBreakpointsWithParams(&v)
}
type DebuggerGetScriptSourceParams struct {
	ScriptId string `json:"scriptId"`
}
func (c *Debugger) GetScriptSourceWithParams(v *DebuggerGetScriptSourceParams) (string, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.getScriptSource", Params: v})
	if err != nil {
		return "", err
	}
	var chromeData struct {
		Result struct {
			ScriptSource string
		}
	}
	if resp == nil {
		return "", &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", err
	}
	return chromeData.Result.ScriptSource, nil
}
func (c *Debugger) GetScriptSource(scriptId string) (string, error) {
	var v DebuggerGetScriptSourceParams
	v.ScriptId = scriptId
	return c.GetScriptSourceWithParams(&v)
}
type DebuggerGetStackTraceParams struct {
	StackTraceId *RuntimeStackTraceId `json:"stackTraceId"`
}
func (c *Debugger) GetStackTraceWithParams(v *DebuggerGetStackTraceParams) (*RuntimeStackTrace, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.getStackTrace", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			StackTrace *RuntimeStackTrace
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.StackTrace, nil
}
func (c *Debugger) GetStackTrace(stackTraceId *RuntimeStackTraceId) (*RuntimeStackTrace, error) {
	var v DebuggerGetStackTraceParams
	v.StackTraceId = stackTraceId
	return c.GetStackTraceWithParams(&v)
}
func (c *Debugger) Pause() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.pause"})
}
type DebuggerPauseOnAsyncCallParams struct {
	ParentStackTraceId *RuntimeStackTraceId `json:"parentStackTraceId"`
}
func (c *Debugger) PauseOnAsyncCallWithParams(v *DebuggerPauseOnAsyncCallParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.pauseOnAsyncCall", Params: v})
}
func (c *Debugger) PauseOnAsyncCall(parentStackTraceId *RuntimeStackTraceId) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerPauseOnAsyncCallParams
	v.ParentStackTraceId = parentStackTraceId
	return c.PauseOnAsyncCallWithParams(&v)
}
type DebuggerRemoveBreakpointParams struct {
	BreakpointId string `json:"breakpointId"`
}
func (c *Debugger) RemoveBreakpointWithParams(v *DebuggerRemoveBreakpointParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.removeBreakpoint", Params: v})
}
func (c *Debugger) RemoveBreakpoint(breakpointId string) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerRemoveBreakpointParams
	v.BreakpointId = breakpointId
	return c.RemoveBreakpointWithParams(&v)
}
type DebuggerRestartFrameParams struct {
	CallFrameId string `json:"callFrameId"`
}
func (c *Debugger) RestartFrameWithParams(v *DebuggerRestartFrameParams) ([]*DebuggerCallFrame, *RuntimeStackTrace, *RuntimeStackTraceId, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.restartFrame", Params: v})
	if err != nil {
		return nil, nil, nil, err
	}
	var chromeData struct {
		Result struct {
			CallFrames        []*DebuggerCallFrame
			AsyncStackTrace   *RuntimeStackTrace
			AsyncStackTraceId *RuntimeStackTraceId
		}
	}
	if resp == nil {
		return nil, nil, nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, nil, nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, nil, nil, err
	}
	return chromeData.Result.CallFrames, chromeData.Result.AsyncStackTrace, chromeData.Result.AsyncStackTraceId, nil
}
func (c *Debugger) RestartFrame(callFrameId string) ([]*DebuggerCallFrame, *RuntimeStackTrace, *RuntimeStackTraceId, error) {
	var v DebuggerRestartFrameParams
	v.CallFrameId = callFrameId
	return c.RestartFrameWithParams(&v)
}
func (c *Debugger) Resume() (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.resume"})
}
type DebuggerSearchInContentParams struct {
	ScriptId string `json:"scriptId"`
	Query string `json:"query"`
	CaseSensitive bool `json:"caseSensitive,omitempty"`
	IsRegex bool `json:"isRegex,omitempty"`
}
func (c *Debugger) SearchInContentWithParams(v *DebuggerSearchInContentParams) ([]*DebuggerSearchMatch, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.searchInContent", Params: v})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Result []*DebuggerSearchMatch
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Result, nil
}
func (c *Debugger) SearchInContent(scriptId string, query string, caseSensitive bool, isRegex bool) ([]*DebuggerSearchMatch, error) {
	var v DebuggerSearchInContentParams
	v.ScriptId = scriptId
	v.Query = query
	v.CaseSensitive = caseSensitive
	v.IsRegex = isRegex
	return c.SearchInContentWithParams(&v)
}
type DebuggerSetAsyncCallStackDepthParams struct {
	MaxDepth int `json:"maxDepth"`
}
func (c *Debugger) SetAsyncCallStackDepthWithParams(v *DebuggerSetAsyncCallStackDepthParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setAsyncCallStackDepth", Params: v})
}
func (c *Debugger) SetAsyncCallStackDepth(maxDepth int) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerSetAsyncCallStackDepthParams
	v.MaxDepth = maxDepth
	return c.SetAsyncCallStackDepthWithParams(&v)
}
type DebuggerSetBlackboxPatternsParams struct {
	Patterns []string `json:"patterns"`
}
func (c *Debugger) SetBlackboxPatternsWithParams(v *DebuggerSetBlackboxPatternsParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setBlackboxPatterns", Params: v})
}
func (c *Debugger) SetBlackboxPatterns(patterns []string) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerSetBlackboxPatternsParams
	v.Patterns = patterns
	return c.SetBlackboxPatternsWithParams(&v)
}
type DebuggerSetBlackboxedRangesParams struct {
	ScriptId string `json:"scriptId"`
	Positions []*DebuggerScriptPosition `json:"positions"`
}
func (c *Debugger) SetBlackboxedRangesWithParams(v *DebuggerSetBlackboxedRangesParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setBlackboxedRanges", Params: v})
}
func (c *Debugger) SetBlackboxedRanges(scriptId string, positions []*DebuggerScriptPosition) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerSetBlackboxedRangesParams
	v.ScriptId = scriptId
	v.Positions = positions
	return c.SetBlackboxedRangesWithParams(&v)
}
type DebuggerSetBreakpointParams struct {
	Location *DebuggerLocation `json:"location"`
	Condition string `json:"condition,omitempty"`
}
func (c *Debugger) SetBreakpointWithParams(v *DebuggerSetBreakpointParams) (string, *DebuggerLocation, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setBreakpoint", Params: v})
	if err != nil {
		return "", nil, err
	}
	var chromeData struct {
		Result struct {
			BreakpointId   string
			ActualLocation *DebuggerLocation
		}
	}
	if resp == nil {
		return "", nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", nil, err
	}
	return chromeData.Result.BreakpointId, chromeData.Result.ActualLocation, nil
}
func (c *Debugger) SetBreakpoint(location *DebuggerLocation, condition string) (string, *DebuggerLocation, error) {
	var v DebuggerSetBreakpointParams
	v.Location = location
	v.Condition = condition
	return c.SetBreakpointWithParams(&v)
}
type DebuggerSetBreakpointByUrlParams struct {
	LineNumber int `json:"lineNumber"`
	Url string `json:"url,omitempty"`
	UrlRegex string `json:"urlRegex,omitempty"`
	ScriptHash string `json:"scriptHash,omitempty"`
	ColumnNumber int `json:"columnNumber,omitempty"`
	Condition string `json:"condition,omitempty"`
}
func (c *Debugger) SetBreakpointByUrlWithParams(v *DebuggerSetBreakpointByUrlParams) (string, []*DebuggerLocation, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setBreakpointByUrl", Params: v})
	if err != nil {
		return "", nil, err
	}
	var chromeData struct {
		Result struct {
			BreakpointId string
			Locations    []*DebuggerLocation
		}
	}
	if resp == nil {
		return "", nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", nil, err
	}
	return chromeData.Result.BreakpointId, chromeData.Result.Locations, nil
}
func (c *Debugger) SetBreakpointByUrl(lineNumber int, url string, urlRegex string, scriptHash string, columnNumber int, condition string) (string, []*DebuggerLocation, error) {
	var v DebuggerSetBreakpointByUrlParams
	v.LineNumber = lineNumber
	v.Url = url
	v.UrlRegex = urlRegex
	v.ScriptHash = scriptHash
	v.ColumnNumber = columnNumber
	v.Condition = condition
	return c.SetBreakpointByUrlWithParams(&v)
}
type DebuggerSetBreakpointOnFunctionCallParams struct {
	ObjectId string `json:"objectId"`
	Condition string `json:"condition,omitempty"`
}
func (c *Debugger) SetBreakpointOnFunctionCallWithParams(v *DebuggerSetBreakpointOnFunctionCallParams) (string, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setBreakpointOnFunctionCall", Params: v})
	if err != nil {
		return "", err
	}
	var chromeData struct {
		Result struct {
			BreakpointId string
		}
	}
	if resp == nil {
		return "", &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", err
	}
	return chromeData.Result.BreakpointId, nil
}
func (c *Debugger) SetBreakpointOnFunctionCall(objectId string, condition string) (string, error) {
	var v DebuggerSetBreakpointOnFunctionCallParams
	v.ObjectId = objectId
	v.Condition = condition
	return c.SetBreakpointOnFunctionCallWithParams(&v)
}
type DebuggerSetBreakpointsActiveParams struct {
	Active bool `json:"active"`
}
func (c *Debugger) SetBreakpointsActiveWithParams(v *DebuggerSetBreakpointsActiveParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setBreakpointsActive", Params: v})
}
func (c *Debugger) SetBreakpointsActive(active bool) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerSetBreakpointsActiveParams
	v.Active = active
	return c.SetBreakpointsActiveWithParams(&v)
}
type DebuggerSetPauseOnExceptionsParams struct {
	State string `json:"state"`
}
func (c *Debugger) SetPauseOnExceptionsWithParams(v *DebuggerSetPauseOnExceptionsParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setPauseOnExceptions", Params: v})
}
func (c *Debugger) SetPauseOnExceptions(state string) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerSetPauseOnExceptionsParams
	v.State = state
	return c.SetPauseOnExceptionsWithParams(&v)
}
type DebuggerSetReturnValueParams struct {
	NewValue *RuntimeCallArgument `json:"newValue"`
}
func (c *Debugger) SetReturnValueWithParams(v *DebuggerSetReturnValueParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setReturnValue", Params: v})
}
func (c *Debugger) SetReturnValue(newValue *RuntimeCallArgument) (*gcdmessage.ChromeResponse, error) {
	var v DebuggerSetReturnValueParams
	v.NewValue = newValue
	return c.SetReturnValueWithParams(&v)
}
type DebuggerSetScriptSourceParams struct {
	ScriptId string `json:"scriptId"`
	ScriptSource string `json:"scriptSource"`
	DryRun bool `json:"dryRun,omitempty"`
}
func (c *Debugger) SetScriptSourceWithParams(v *DebuggerSetScriptSourceParams) ([]*DebuggerCallFrame, bool, *RuntimeStackTrace, *RuntimeStackTraceId, *RuntimeExceptionDetails, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Debugger.setScriptSource", Params: v})
	if err != nil {
		return nil, false, nil, nil, nil, err
	}
	var chromeData struct {
		Result struct {
			CallFrames        []*DebuggerCallFrame
			StackChanged      bool
			AsyncStackTrace   *RuntimeStackTrace
			AsyncStackTraceId *RuntimeStackTraceId
			ExceptionDetails  *RuntimeExceptionDetails
		}
	}
	if resp == nil {
		return nil, false, nil, nil, nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, false, nil, nil, nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, false, nil, nil, nil, err
	}
	return chromeData.Result.CallFrames, chromeData.Result.StackChanged, chromeData.Result.AsyncStackTrace, chromeData.Result.AsyncStackTraceId, chromeData.Result.ExceptionDetails, nil
}