Generally it tends to involve muffled screaming.. but for me it comes down to a couple of key approaches.
1) breakpoints. So many breakpoints.
2) comment the code yourself as you work through it.. if you can't work something out, leave a to-do and come back to it, but comment every live if you need to. Writing it down generally helps me get a grip in my mind of it.
Actually, my first go at it generally involves fitting it up on a closed test server and turning on a SQL trace and taking a look at the SQL that is hitting the database. From there I can generally understand a bit easier. Obvious exceptions of course
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.