Hacker News new | ask | show | jobs
by mstwntd_g 1882 days ago
for poorly written python code that is just too large to add the many print statments.. I run it using trace and pipe to a log.. ofc pdb is awesome too.. provided it crashes so I can work in the stack trace..

for bash I do something similar by using set -x and a custom PS4 prompt that gives me file function and line number..

in my own code I have info, warn, error and debug log lines (for both bash and python).. so I rarely have to resort to enabling trace..