in reply to Printing source code while running

Although I like the Devel::Trace module that others have suggested, I sometimes find it too verbose. Last week I used Sub::WrapPackages to log subroutine calls within certain packages, as well as their input and output. You could also use Aspect's before and after hooks to provide similar functionality.