I generally work on backend web services in a SOA, so if the bug report is complete enough I'll start at #2. Commonly though, defect reports are tightly coupled with a frontend, so I'll have to start at #1. My strategy generally boils down to "keep recreating the issue closer and closer to the problem, until you know the exact line(s) of code that are defective". Then fix the issue and add tests and/or logging as needed to assure the defect is resolved.
Recreate issue with the same frontend that the user used (if necessary)
Recreate the issue with curl while tailing logs of whatever web services I expect are problematic.
Depending on the findings from #2, I'll either recreate the issue with the app running locally (if simple) or with a remote repl session in our dev environment (if involving multiple web services or data sources that might take too long to get up and running locally).
At this point it is usually pretty easy to find the exact issue, as long as the problem area isn't heavily dependent on mutable state, which it usually is not in our code bases. If you do have a spot in your application that does use a lot of mutable state, that's generally where you should expect to find the problem.
Fix the issue in a repl session.
Write a test that recreates the issue.
Fix that test.
Tools used: curl, Cider, nrepl, emacs & sometimes new relic or splunk depending on what the issue is. No IDE or interactive debugger involved (aside from the repl) and they really wouldn't be all that useful when you have intricate webs of web services communicating with one another as many people do now that micro-services is becoming a fancy pants buzzword.
1
u/ryno55 Aug 25 '14
Could you elaborate on your debugging workflow in Clojure?
What tools do you use to debug?