Debugging ColdFusion 9 on shared hosting

With ColdFusion 9 debugging can be enabled on a page by page basis. This is super handy in a shared hosting environment where you don’t have access to the CFADMIN.

Step 1

Set debuggingipaddress and enablerobustexception in the THIS scope of your Application.cfc.  You can use http://www.whatismyip.com if you don’t know your ip address.

<!--- define a debugging ip --->
<cfset this.debuggingipaddresses="xxx.xxx.xxx.xxx">
<!--- enable robust exception --->
<cfset this.enablerobustexception="yes">

Step 2

Enable show debug output at the top of your page’s code.

  
<!--- enable show debug output --->
<cfsetting showdebugoutput="true">

You should now see your debugging info appended to the page.

Just to verify!

You can verify debugging is enabled by outputting the value of IsDebugMode().

<!--- Is debugging on?  Should be yes when showdebugoutput="true" --->
<cfoutput>#IsDebugMode()#</cfoutput>

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.