Skip to main content
Inspiring
September 28, 2016
Question

Is Page Level Debugging Possible?

  • September 28, 2016
  • 2 replies
  • 414 views

My code runs on a shared ColdFusion server.  Therefore I do not have access to the CF Administrator.  Therefore I cannot use the CF Administrator to enable debugging.  Is there a way within my page I can enable debugging for that page?

This topic has been closed for replies.

2 replies

Legend
September 28, 2016

Look at the CFSETTINGS tag. I believe there is a debug setting, simply call the tag at the beginning of your page. I have never used it this way though, I tend to use a lot of log entries and/or email logic like what WolfShade describes -- although I do it at the error page level (either using CFERROR tag or onError within the application.cfc).

WolfShade
Legend
September 28, 2016

I assumed that since the OP indicated that access to the CFAdmin was denied, the setting in CFAdmin for displaying debugging information was turned off, or at least his/her IP address was not in the allowed list for displaying debugging information.

If debugging is turned off, or his/her IP address is not in the allowed list, then the CFTRY/CFCATCH/CFDUMP solution will work.

V/r,

^_^

WolfShade
Legend
September 28, 2016

IMHO, the best thing you can do for debugging is to use a CFTRY/CFCATCH around the code that is causing issues, and use the CFCATCH to CFMAIL (type = "html") a CFDUMP of the #cfcatch# object, to yourself.  When the email arrives, check the message to see what is causing the issue.  It might be a pain to have to do over and over and over, but it's effective.

HTH,

^_^