events.go 6.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package debugger
  2. // Code generated by cdproto-gen. DO NOT EDIT.
  3. import (
  4. "github.com/chromedp/cdproto/runtime"
  5. "github.com/mailru/easyjson"
  6. )
  7. // EventBreakpointResolved fired when breakpoint is resolved to an actual
  8. // script and location.
  9. //
  10. // See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-breakpointResolved
  11. type EventBreakpointResolved struct {
  12. BreakpointID BreakpointID `json:"breakpointId"` // Breakpoint unique identifier.
  13. Location *Location `json:"location"` // Actual breakpoint location.
  14. }
  15. // EventPaused fired when the virtual machine stopped on breakpoint or
  16. // exception or any other stop criteria.
  17. //
  18. // See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-paused
  19. type EventPaused struct {
  20. CallFrames []*CallFrame `json:"callFrames"` // Call stack the virtual machine stopped on.
  21. Reason PausedReason `json:"reason"` // Pause reason.
  22. Data easyjson.RawMessage `json:"data,omitempty"`
  23. HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs
  24. AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
  25. AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
  26. }
  27. // EventResumed fired when the virtual machine resumed execution.
  28. //
  29. // See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-resumed
  30. type EventResumed struct{}
  31. // EventScriptFailedToParse fired when virtual machine fails to parse the
  32. // script.
  33. //
  34. // See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-scriptFailedToParse
  35. type EventScriptFailedToParse struct {
  36. ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
  37. URL string `json:"url"` // URL or name of the script parsed (if any).
  38. StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
  39. StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
  40. EndLine int64 `json:"endLine"` // Last line of the script.
  41. EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
  42. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
  43. Hash string `json:"hash"` // Content hash of the script, SHA-256.
  44. ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
  45. SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
  46. HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL.
  47. IsModule bool `json:"isModule,omitempty"` // True, if this script is ES6 module.
  48. Length int64 `json:"length,omitempty"` // This script length.
  49. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript top stack frame of where the script parsed event was triggered if available.
  50. CodeOffset int64 `json:"codeOffset,omitempty"` // If the scriptLanguage is WebAssembly, the code section offset in the module.
  51. ScriptLanguage ScriptLanguage `json:"scriptLanguage,omitempty"` // The language of the script.
  52. EmbedderName string `json:"embedderName,omitempty"` // The name the embedder supplied for this script.
  53. }
  54. // EventScriptParsed fired when virtual machine parses script. This event is
  55. // also fired for all known and uncollected scripts upon enabling debugger.
  56. //
  57. // See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#event-scriptParsed
  58. type EventScriptParsed struct {
  59. ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
  60. URL string `json:"url"` // URL or name of the script parsed (if any).
  61. StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
  62. StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
  63. EndLine int64 `json:"endLine"` // Last line of the script.
  64. EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
  65. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
  66. Hash string `json:"hash"` // Content hash of the script, SHA-256.
  67. ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
  68. IsLiveEdit bool `json:"isLiveEdit,omitempty"` // True, if this script is generated as a result of the live edit operation.
  69. SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
  70. HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL.
  71. IsModule bool `json:"isModule,omitempty"` // True, if this script is ES6 module.
  72. Length int64 `json:"length,omitempty"` // This script length.
  73. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript top stack frame of where the script parsed event was triggered if available.
  74. CodeOffset int64 `json:"codeOffset,omitempty"` // If the scriptLanguage is WebAssembly, the code section offset in the module.
  75. ScriptLanguage ScriptLanguage `json:"scriptLanguage,omitempty"` // The language of the script.
  76. DebugSymbols *DebugSymbols `json:"debugSymbols,omitempty"` // If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
  77. EmbedderName string `json:"embedderName,omitempty"` // The name the embedder supplied for this script.
  78. }