I'm working on a bunch of legacy ColdFusion applications and coming from a Java background it's really hard to debug something. So I'm at a point where, in order to debug, I place writeDump()
or <cfdump>
calls around the place to first get the flow of the application (it's something huge) and secondly to get some information on variable values. It's a painful process, so I was thinking if there's a way to "automate" it, at least to some extent.
I know I could place a log/dump call at the beginning of each function, but it would be a huge task.
I know in Java I could use an Aspect Oriented Programming library (for example How to use AOP with AspectJ for logging?) so I can define pointcuts for all methods in a class, and based on that do my desired logging logic (log the method name).
Is there something like that in ColdFusion? My requirements would be to use it without modifying existing code, to be as broad as possible so that I don't need to tell it to log each method, and to be easy to configure so I can add/remove/change what components to track and log.