Joseph, 

Try something like this:

<cfif isDefined("url.showDebugOutput")>
        <cfsetting showDebugOutput="true">
</cfif>

Russ
> -----Original Message-----
> From: Joseph Lamoree [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 05, 2006 4:01 PM
> To: CF-Talk
> Subject: Debugging per request
> 
> I have a CFMX server behind an application proxy that I need to get
> debugging information on. I can't add "my" IP to the list of IPs that
> see debugging information, since that is the same IP that all
> requests appear to originate from.
> 
> I was hoping that there was some way I could use the DebuggingService
> to turn on the debug info on a per-request basis. I'm beginning to
> think it's not possible, but I wanted to ask the gurus before I gave up.
> 
> Using the test page below, it appears that the debugging service only
> captures information for requests from IPs that are *already* on the
> list of enabled IPs. In other words, if I turn debugging on within a
> chunk of CFML, I won't see debugging output until I make another
> request. Bummer.
> 
> Anyone know of another way?
> 
> --
> Joseph Lamoree
> 
> 
> -----snip-----snip-----snip-----snip-----snip-----snip-----snip-----
> snip-----snip-----snip-----snip-----
> <cfparam name="url.debug" default=""/>
> 
> <cfscript>
>    variables.serviceFactory = createobject("java",
> "coldfusion.server.ServiceFactory");
>    variables.debugService =
> variables.serviceFactory.getDebuggingService();
>    variables.debugService.settings.enabled = 1;
>    variables.debugService.settings.trace = 1;
>    variables.debugService.settings.general = 1;
> 
>    variables.IPlist = variables.debugService.iplist.ipList;
>    variables.IPindex = listFind(variables.IPlist, CGI.REMOTE_ADDR);
>    if (variables.IPindex eq 0 and url.debug eq "on") {
>       variables.debugService.iplist.ipList = listAppend(variables.IPlist,
> CGI.REMOTE_ADDR);
>    } else if (variables.IPindex gt 0 and url.debug eq "off") {
>       variables.debugService.iplist.ipList = listDeleteAt
> (variables.IPlist, variables.IPindex);
>    }
> </cfscript>
> 
> <cfoutput>
>    <cfif variables.debugService.isValidIP(CGI.REMOTE_ADDR)>
>       <p>Debugging for #CGI.REMOTE_ADDR# : <span style="color:
> ##090;">enabled</span></p>
>    <cfelse>
>       <p>Debugging for #CGI.REMOTE_ADDR# : <span style="color:
> ##900;">disabled</span></p>
>    </cfif>
> </cfoutput>
> 
> <p>
> <a href="debug.cfm?debug=on">On</a> |
> <a href="debug.cfm?debug=off">Off</a> |
> <a href="" onclick="self.document.location.reload(); return
> false">Refresh</a>
> </p>
> -----snip-----snip-----snip-----snip-----snip-----snip-----snip-----
> snip-----snip-----snip-----snip-----
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245442
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to