DEV Community

Discussion on: How to debug in production

Collapse
 
ariehkovler profile image
Arieh Kovler

I think the problem with debugging production is that you often don't have the luxury of making any changes to the production code if you're only hunting for bugs. Like, it's one thing to push a new bugfix version live, but nobody wants to be pushing a new version of production code just to add a verbose log line or two, especially when they might be in the wrong place!

One option I've discovered for some languages (basically, it doesn't work on true compiled code, only interpreted or bitcode languages), is Rookout.com which kind of lets you inspect the code execution line-by-line. It's a bit like breakpoints except they don't stop the code.

I like methods like this because it's more similar to how I debug during development, by inspecting the code and the variables rather than relying on logs and stuff.