debug - The Go Programming Language

Golang

Package debug

import "runtime/debug"
Overview
Index

Overview ?

Overview ?

Package debug contains facilities for programs to debug themselves while they are running.

Index

func PrintStack()
func Stack() []byte

Package files

stack.go

func PrintStack

func PrintStack()

PrintStack prints to standard error the stack trace returned by Stack.

func Stack

func Stack() []byte

Stack returns a formatted stack trace of the goroutine that calls it. For each routine, it includes the source line information and PC value, then attempts to discover, for Go functions, the calling function or method and the text of the line containing the invocation.