tags:

views:

64

answers:

5

Hello, I have some 'spaghetti'-style code that is generously saused with Custom tags and Stored procedures calls. Templates include each other, custom tags nested and stored procedures are callind other stored procedures in their place.

Problem is that one template call is hanging somewhere in between. I cannot get any error out and cannot see debug output. What is best way to debug such 'hanging' request with as much detail as possible ?

Thanks!

+1  A: 

If the built-in debugger is of no use cause the request just hang the other quick way is to just start with a cfabort at the top and keep moving it down until you hit the file causing the request to hang.

jfrobishow
I did this, but I thought it's quite 'low-tech' solution. I traced error down to MySQL stored procedure (that call other procedures) and currently I stopped there.
Rodion Bykov
It is low tech for sure. The debugger would be better if it's available/usable as it will provide break points and step-in, step-into, variables inspection, etc. but sometime if it's just a hard problem in spaghetti code a debugger cause more pain than anything, cflog can help as well...
jfrobishow
+3  A: 

If you are using CF 8+, you can use the Step Debugging tools in Eclipse to step through the code: http://www.adobe.com/devnet/coldfusion/articles/debugger.html

If you are using an earlier version, you can use a 3rd party product like Fusion Debug ( http://www.fusion-debug.com/fd/ ) to do the same thing.

If you are using CF8, you can also use the CF Admin Server Monitor to see where a thread is hanging as well: http://www.adobe.com/devnet/coldfusion/articles/monitoring_pt1.html

Edward M Smith
+1  A: 

CFTrace is a great tool for this. It is native and reports time information as well.

Tom Hubbard
A: 

Have you looked at the standard coldfusion server log files to see what might be in there?

Have you run the server in a console window so you can see what is appearing in the console as the templates are running (or not as the case might be)?

Stephen Moretti
thanks, but for best of bad luck, system hangs on remote live server...
Rodion Bykov
A: 

You could Take jvm thread dumps. You can do from command line or via server monitoring if you have Enterprise 8+

David Collie