Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Not registering 'return' #46

Closed
gak opened this issue Aug 12, 2009 · 2 comments
Closed

Not registering 'return' #46

gak opened this issue Aug 12, 2009 · 2 comments

Comments

@gak
Copy link
Owner

gak commented Aug 12, 2009

The callgraphs I generated looked wrong.
It turns out that the tracer function needs to return a tracer to be used in each local scope!
(See http://www.python.org/doc/2.3.4/lib/debugger-hooks.html#debugger-hooks)

I added a line to tracer, to return itself. That seemed to work:

{{{
def tracer(frame, event, arg):
................
if event == 'return':
if pr: print 'return'
if call_stack:
call_stack.pop(-1)
return tracer #new

}}}

@gak
Copy link
Owner Author

gak commented Aug 12, 2009

Author: mig000
yepp, same problem with the same solution

@gak
Copy link
Owner Author

gak commented Aug 12, 2009

Author: gak

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant