debugger

package
v0.0.0-...-abed891 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: GPL-3.0 Imports: 13 Imported by: 3

Documentation

Overview

Package debugger provides functionality for using Chrome and the Chrome Dev Tools protocol

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserScripts

func GetUserScripts(path string) (string, error)

Types

type Debugger

type Debugger struct {
	ChromeProxy    *gcd.Gcd
	Done           chan bool
	Options        Options
	Target         *gcd.ChromeTarget
	Modules        modules.Modules
	XHRBreakPoints []string

	MessageChan chan string
}

Debugger holds the configuration for the Chrome Dev Protocol hooks. It also contains modules to be used as requests and responses are intercepted.

func (*Debugger) CallInspectors

func (d *Debugger) CallInspectors(webData modules.WebData)

CallInspectors executes inspectors in a gorp session

func (*Debugger) CallProcessors

func (d *Debugger) CallProcessors(data modules.WebData) (string, error)

CallProcessors alters the body of web responses using the selected processors

func (*Debugger) InjectScriptAsPageObject

func (d *Debugger) InjectScriptAsPageObject(scripts *string) string

func (*Debugger) SetupDOMDebugger

func (d *Debugger) SetupDOMDebugger()

func (*Debugger) SetupFileLogger

func (d *Debugger) SetupFileLogger()

func (*Debugger) SetupRequestInterception

func (d *Debugger) SetupRequestInterception(params *gcdapi.NetworkSetRequestInterceptionParams)

SetupRequestInterception enables request interception using the specific params

func (*Debugger) StartTarget

func (d *Debugger) StartTarget()

StartTarget initializes Chrome and sets up the Chrome Dev Tools protocol targets so that events can be intercepted

func (*Debugger) UpdateScriptsOnLoad

func (d *Debugger) UpdateScriptsOnLoad(path string)

type Options

type Options struct {
	EnableConsole bool
	Verbose       bool
	Scope         string
	LogFile       string
}

Options defines the options used with the debugger, which is responsible for using the Chrome Dev Tools protocol

Jump to

Keyboard shortcuts

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