webdebug

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package webdebug serves a browser-based debugger that replays an Apex debug log.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves the debugger page and the API it uses to control a replay.

func NewServer

func NewServer(session *apexlog.Session, sources map[string]Source) (*Server, error)

NewServer returns a server for a session, stopped at the first statement.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the HTTP handler for the page and the API.

func (*Server) Run

func (s *Server) Run(ctx context.Context, ready func(url string)) error

Run listens on a random port of 127.0.0.1, calls ready with the debugger's URL, and serves until the page's Quit button is pressed or ctx is done.

func (*Server) Token

func (s *Server) Token() string

Token is the value API requests must send in the X-Debug-Token header. It is given to the page in the URL, so that other local users and web pages cannot control the debugger.

type Source

type Source struct {
	Name  string
	Lines []string
	// Missing explains why there are no lines, such as a class in a
	// managed package.
	Missing string
}

Source is the source of a class, trigger, or anonymous Apex.

Jump to

Keyboard shortcuts

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