Debug Stack

The DebugStack module provides APIs related to stack frames and other debug information.

API

class Lua.DebugStack: LibTSMModule
staticmethod AddShortenPattern(pattern: string, replacement: string)

Adds a pattern and replacement string for shortening the names of addons stack frames.

Parameters:
  • pattern (string) – The search pattern

  • replacement (string) – The replacement string

staticmethod GetLocation(targetLevel: number, thread?: thread): string?

Gets the location string for the specified stack level.

Parameters:
  • targetLevel (number) – The stack level to get the location for

  • thread? (thread) – The thread to get the location for