Skip to content

ke-zhang-rd/ambush

Repository files navigation

ambush

This is a debug toolbox.

Features

Example:

# main.py
from sub import Member

class Primary:

    def foo(self):
        a = 1
        a = a + 1
        m = Member()
        m.bar()
        a = a + 1
        a = a + 1


p = Primary()
p.foo()
# sub.py
class Member:

    def bar(self):
        from ambush import detector
        detector()

Output:

Who is calling current function
=========================================================
In file:
/Users/kz2249/tmp/main.py

class Primary:
    # by caller function:
    def foo in line 6
        ...
        # actually call:
        m.bar() # in line 10
        ...

Peek:
---------------------------------------------------------
    def foo(self):
        a = 1
        a = a + 1
        m = Member()
        m.bar()
        a = a + 1
        a = a + 1

=========================================================

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages