Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

Update to debugClean and an interesting use of URL scope

January 24, 2011

Two updates to debugClean:

1. Bug fixed
For some users the same results would not refresh on subsequent uses of debugClean. This was caused by the underlying browser in Eclipse not refreshing. You may be shocked to hear that the browser causing this problem was Internet Explorer! At first I tried adding another variable to the url that is created when debugClean in fired up (its handlers/index.cfm if you want to see). However, this caused error after error and I eventually deduced that only one URL variable could be passed.

To solve this I created the name of the URL variable with createUUID() like so: work.cfm?#createUUID()#=#urlEncodedFormat( theXML.event.ide.projectview.resource.XmlAttributes['path'] )#
and in work.cfm have the following code to read in that variable: <cfloop collection="#url#" item="u"> <cfset path = url[ u ]> </cfloop>

2. Check for application/javascript
This one has caught me out a few times. will work in every browser except one. That missing browser? Internet Explorer! Though, by now, I should know better than to use application/javascript and instead to use text/javascript. Anyhoo the default configuration of debugClean will know check for application/javascript. This was as simple as adding it to the array in _config.cfm: request.lookFor = ["cfdump","writeDump","cflog","writeLog","console.log","application/javascript"];

Go to the main project page to download the latest version.


No Comments

Some comments have been lost over the years due to moving hosts.

More


More blog entries that I have written.

Code coloring by PRISM.