gak / pycallgraph

pycallgraph is a Python module that creates call graphs for Python programs.
GNU General Public License v2.0
1.83k stars 335 forks source link

Subsequent calls to start_trace(reset=False) loses __main__ #68

Closed gak closed 15 years ago

gak commented 15 years ago

It seems calls to start_trace(reset=False) loses edges from main for all but the first start_trace, i.e. the first one after a reset_trace(). It seems maybe there is something that needs "resetting" even when not resetting?

Simple example:

        pycallgraph.start_trace(reset=False)
        #pycallgraph.stop_trace()
        pycallgraph.start_trace(reset=False)
        ...test code here...
        pycallgraph.stop_trace()

That works normally, now uncomment the stop_trace() command, and rerun... main disappears.

gak commented 15 years ago

Author: anonymous Oops. Sorry about the formatting. Obviously it should be this:

{{{ pycallgraph.start_trace(reset=False)

pycallgraph.stop_trace()

pycallgraph.start_trace(reset=False) ...test code here... pycallgraph.stop_trace() }}}

gak commented 15 years ago

Author: anonymous