Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

Idiom #253 Print stack trace

Print the stack frames of the current execution thread of the program.

import "runtime/debug"
debug.PrintStack()
import inspect
for frame in inspect.stack():
    print(frame)
puts caller

New implementation...
programming-idioms.org