Pacific-Design.com

    
Home Index

1. Bash

2. Debug

Bash / Debug /

# Add debug after every Perl subroutine
function adddebug()
{
  sed -i '/^sub/ a\open(FILE,">>/tmp/kevin.txt"); 
  print FILE __LINE__ . ":" . (caller(0))[3] . "\\n"; 
  close(FILE);' $1  
}