Skip to content

Instantly share code, notes, and snippets.

@warabanshi
Created November 10, 2020 00:58
Show Gist options
  • Save warabanshi/5cb4ee4be12ed514ac5077435e35f464 to your computer and use it in GitHub Desktop.
Save warabanshi/5cb4ee4be12ed514ac5077435e35f464 to your computer and use it in GitHub Desktop.
inspect stuck frame
def get_stuckframe1():
get_stuckframe2()
def get_stuckframe2():
curframe = inspect.currentframe()
calframe = inspect.getouterframes(curframe, 2)
print('inspect = %s' % "\n".join([str(t) for t in calframe]))
if __name__ == '__main__':
get_stuchframe1()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment