Re: debugging in cfscript

2012-02-09 Thread daniel kessler

you have cf_abort in your code instead of cf_abort()

I am using cf_abort. 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349845
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-09 Thread daniel kessler

Looks like the issue is that you have the cf_dump() and cf_abort() calls
outside of the curly braces.

ok, that's a thought that I hadn't considered.  I moved them inside the 
brackets and now I don't receive an error.  Thank you!

Unfortunately, I also don't receive the dump or the abort.  I even built an 
array to dump to simplify the test and assure that there's dumpable data.  
sigh  I guess I'm just not used to this.  Maybe the logs will reveal what 
happened.


daniel 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349846
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-09 Thread daniel kessler

 Unfortunately, I also don't receive the dump or the abort.  I even 
 built an array to dump to simplify the test and assure that there's 
 dumpable data.  sigh  I guess I'm just not used to this.  Maybe the 
 logs will reveal what happened.

ok, it looks like the cf_dump() is working.  If I put a cfabort inside it's 
function.  I tried following the cf_dump() with a cf_abort for it's own 
function, but that didn't do the abort and I didn't see the dump (which should 
even display without the abort), but once I put the cfabort inside the 
cf_dump function, I saw the output.

thank you everyone for your help.


daniel 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349848
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-09 Thread Rex

yes, but to call cf_abort, you want to do cf_abort()

It's like calling #now# instead of #now()#

- Rex

On 2/9/2012 5:46 AM, daniel kessler wrote:
 you have cf_abort in your code instead of cf_abort()
 I am using cf_abort.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349851
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-09 Thread Carl Von Stetten

Rex,

I think cf_abort is a custom tag, not a UDF, so it would not be called 
using cf_abort().
-Carl

On 2/9/2012 9:19 AM, Rex wrote:
 yes, but to call cf_abort, you want to do cf_abort()

 It's like calling #now# instead of #now()#

 - Rex

 On 2/9/2012 5:46 AM, daniel kessler wrote:
 you have cf_abort in your code instead of cf_abort()
 I am using cf_abort.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349853
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-09 Thread Matt Quackenbush

Nopers. Daniel has an cffunction name=cf_abort in his CFC. See his
previous posts in the thread.


On Thu, Feb 9, 2012 at 12:04 PM, Carl Von Stetten
vonner.li...@vonner.netwrote:


 Rex,

 I think cf_abort is a custom tag, not a UDF, so it would not be called
 using cf_abort().
 -Carl

 On 2/9/2012 9:19 AM, Rex wrote:
  yes, but to call cf_abort, you want to do cf_abort()
 
  It's like calling #now# instead of #now()#
 
  - Rex
 
  On 2/9/2012 5:46 AM, daniel kessler wrote:
  you have cf_abort in your code instead of cf_abort()
  I am using cf_abort.
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349854
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-09 Thread Carl Von Stetten

Oops. I missed that.  Nevermind! :-[

On 2/9/2012 10:10 AM, Matt Quackenbush wrote:
 Nopers. Daniel has ancffunction name=cf_abort  in his CFC. See his
 previous posts in the thread.


 On Thu, Feb 9, 2012 at 12:04 PM, Carl Von Stetten
 vonner.li...@vonner.netwrote:

 Rex,

 I think cf_abort is a custom tag, not a UDF, so it would not be called
 using cf_abort().
 -Carl

 On 2/9/2012 9:19 AM, Rex wrote:
 yes, but to call cf_abort, you want to do cf_abort()

 It's like calling #now# instead of #now()#

 - Rex

 On 2/9/2012 5:46 AM, daniel kessler wrote:
 you have cf_abort in your code instead of cf_abort()
 I am using cf_abort.



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349855
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread daniel kessler

I added this to my component, but I'm getting an error while calling it from 
within the component.

cfcomponent hint=Replaces The Package PK_employer

cffunction name=cf_abort output=false returntype=void
 cfabort /
/cffunction

cffunction name=cf_dump output=false returntype=void
 cfargument name=objToDump type=any required=false default= /

 cfdump var=#arguments.objToDump# /
/cffunction


Then further down, I call the cf_dump, like 
cf_dump(dbResult);

How do I implement this correctly?

Thank you for your assistance.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349835
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread daniel kessler

To clarify, I receive an error when these function calls are used and no error 
when they're commented out.
---
Invalid CFML construct found on line 78 at column 33.
ColdFusion was looking at the following text:

else

The CFML compiler was processing:

a script statement beginning with { on line 63, column 39.
a script statement beginning with if on line 63, column 17.
a cfscript tag beginning on line 52, column 18.
a cfscript tag beginning on line 52, column 18.

 
The error occurred in C:\localServer\beatch\cfc\emp.cfc: line 78

76 : //cf_dump(dbResult);
77 : cf_abort;
78 :else
79 :request.inStruct.beatch_id = ;

80 :

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349836
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread Matt Quackenbush

First off, this is a nearly 4 year old thread. It may or may not apply to
what you're working on now.

What CFML engine and version are you using?

What is the relevant code?


On Wed, Feb 8, 2012 at 1:24 PM, daniel kessler dani...@umd.edu wrote:


 To clarify, I receive an error when these function calls are used and no
 error when they're commented out.
 ---
 Invalid CFML construct found on line 78 at column 33.
 ColdFusion was looking at the following text:

 else

 The CFML compiler was processing:

a script statement beginning with { on line 63, column 39.
a script statement beginning with if on line 63, column 17.
a cfscript tag beginning on line 52, column 18.
a cfscript tag beginning on line 52, column 18.


 The error occurred in C:\localServer\beatch\cfc\emp.cfc: line 78

 76 : //cf_dump(dbResult);
 77 : cf_abort;
 78 :else
 79 :request.inStruct.beatch_id = ;
 80 :

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349837
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread daniel kessler

First off, this is a nearly 4 year old thread. It may or may not apply to
what you're working on now.

What CFML engine and version are you using?

What is the relevant code?


I didn't think reposting was a good idea, since there was a thread with a 
relevant history.
I'm using CF7.

I posted the relevant code: part of the component, the cfabort/dump code, and 
my call.  Is there more code that you would like? 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349838
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread Matt Quackenbush

The error code mentions Line 63 as the start of an if () statement, and
Line 52 as the start of the cfscript tag. We'll need probably the entire
if () block at the least, as it would seem the issue lies in there.

Hard to speculate based solely upon the error message, as CF is notorious
for providing rather cryptic error messages which often send one off
chasing ghosts.

On Wed, Feb 8, 2012 at 1:37 PM, daniel kessler dani...@umd.edu wrote:


 First off, this is a nearly 4 year old thread. It may or may not apply to
 what you're working on now.
 
 What CFML engine and version are you using?
 
 What is the relevant code?


 I didn't think reposting was a good idea, since there was a thread with a
 relevant history.
 I'm using CF7.

 I posted the relevant code: part of the component, the cfabort/dump code,
 and my call.  Is there more code that you would like?

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349839
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread daniel kessler

The error code mentions Line 63 as the start of an if () statement, and
Line 52 as the start of the cfscript tag. We'll need probably the entire
if () block at the least, as it would seem the issue lies in there.

Hard to speculate based solely upon the error message, as CF is notorious
for providing rather cryptic error messages which often send one off
chasing ghosts.

In this case, it is reporting loosely.  If I comment out the cf_abort, there is 
no error.  So it has a problem with the cf_abort.  That being a problem, messes 
with the next line, the else.  Since the else is part of the IF, it complains 
about the whole IF.  Really, it's complaining about the cf_abort, like it 
doesn't know what it is.

However, the IF is several hundred lines long.  Here's the relevant part up to 
the 'else' that works fine with the cf_abort commented out:

if (len(arguments.inStruct.a_agent_first_name) gt 0 OR 
len(arguments.inStruct.a_agent_middle_initial) gt 0 OR 
len(arguments.inStruct.a_agent_last_name) gt 0 OR
   len(arguments.inStruct.a_agent_firm_ein) gt 
0 OR len(arguments.inStruct.a_agent_firm_name) gt 0 OR 
len(arguments.inStruct.a_agent_phone) gt 0 OR
   len(arguments.inStruct.a_agent_phone_ext) gt 
0 OR len(arguments.inStruct.a_agent_address_1) gt 0 OR 
len(arguments.inStruct.a_agent_address_2) gt 0 OR
   len(arguments.inStruct.a_agent_city) gt 0 OR 
len(arguments.inStruct.a_agent_state_id) gt 0 OR 
len(arguments.inStruct.a_agent_province) gt 0 OR
   len(arguments.inStruct.a_agent_country_id) 
gt 0 OR len(arguments.inStruct.a_agent_postal_code) gt 0 OR 
len(arguments.inStruct.a_agent_email) gt 0)
{
dbResult = 
request.oEmployer.Ins_Agent_Tbl(arguments.inStruct);
if (dbResult eq 0,)
request.inStruct.l_agent_id = 
listGetAt(dbResult,2);
else
request.inStruct.l_agent_id = 
;
}
 //cf_dump(dbResult);
   cf_abort;
else
request.inStruct.l_agent_id = ;   



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349840
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread Matt Quackenbush

Looks like the issue is that you have the cf_dump() and cf_abort() calls
outside of the curly braces.

if ( // all those items )
{
// stuff here
}
cf_dump(dbResult);
cf_abort();
else
// other stuff

You need to move those two items inside of the }.

HTH


On Wed, Feb 8, 2012 at 2:05 PM, daniel kessler dani...@umd.edu wrote:


 The error code mentions Line 63 as the start of an if () statement, and
 Line 52 as the start of the cfscript tag. We'll need probably the entire
 if () block at the least, as it would seem the issue lies in there.
 
 Hard to speculate based solely upon the error message, as CF is notorious
 for providing rather cryptic error messages which often send one off
 chasing ghosts.

 In this case, it is reporting loosely.  If I comment out the cf_abort,
 there is no error.  So it has a problem with the cf_abort.  That being a
 problem, messes with the next line, the else.  Since the else is part of
 the IF, it complains about the whole IF.  Really, it's complaining about
 the cf_abort, like it doesn't know what it is.

 However, the IF is several hundred lines long.  Here's the relevant part
 up to the 'else' that works fine with the cf_abort commented out:

 if (len(arguments.inStruct.a_agent_first_name) gt 0 OR
 len(arguments.inStruct.a_agent_middle_initial) gt 0 OR
 len(arguments.inStruct.a_agent_last_name) gt 0 OR
   len(arguments.inStruct.a_agent_firm_ein)
 gt 0 OR len(arguments.inStruct.a_agent_firm_name) gt 0 OR
 len(arguments.inStruct.a_agent_phone) gt 0 OR

 len(arguments.inStruct.a_agent_phone_ext) gt 0 OR
 len(arguments.inStruct.a_agent_address_1) gt 0 OR
 len(arguments.inStruct.a_agent_address_2) gt 0 OR
   len(arguments.inStruct.a_agent_city) gt
 0 OR len(arguments.inStruct.a_agent_state_id) gt 0 OR
 len(arguments.inStruct.a_agent_province) gt 0 OR

 len(arguments.inStruct.a_agent_country_id) gt 0 OR
 len(arguments.inStruct.a_agent_postal_code) gt 0 OR
 len(arguments.inStruct.a_agent_email) gt 0)
{
dbResult =
 request.oEmployer.Ins_Agent_Tbl(arguments.inStruct);
if (dbResult eq 0,)
request.inStruct.l_agent_id
 = listGetAt(dbResult,2);
else
request.inStruct.l_agent_id
 = ;
}
 //cf_dump(dbResult);
   cf_abort;
else
request.inStruct.l_agent_id = ;


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349842
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: debugging in cfscript

2012-02-08 Thread Azadi Saryev

you have cf_abort in your code instead of cf_abort()

On Thu, Feb 9, 2012 at 04:20, Matt Quackenbush quackfu...@gmail.com wrote:

 Looks like the issue is that you have the cf_dump() and cf_abort() calls
 outside of the curly braces.

 if ( // all those items )
 {
    // stuff here
 }
    cf_dump(dbResult);
    cf_abort();
 else
    // other stuff

 You need to move those two items inside of the }.

 HTH


 On Wed, Feb 8, 2012 at 2:05 PM, daniel kessler dani...@umd.edu wrote:


 The error code mentions Line 63 as the start of an if () statement, and
 Line 52 as the start of the cfscript tag. We'll need probably the entire
 if () block at the least, as it would seem the issue lies in there.
 
 Hard to speculate based solely upon the error message, as CF is notorious
 for providing rather cryptic error messages which often send one off
 chasing ghosts.

 In this case, it is reporting loosely.  If I comment out the cf_abort,
 there is no error.  So it has a problem with the cf_abort.  That being a
 problem, messes with the next line, the else.  Since the else is part of
 the IF, it complains about the whole IF.  Really, it's complaining about
 the cf_abort, like it doesn't know what it is.

 However, the IF is several hundred lines long.  Here's the relevant part
 up to the 'else' that works fine with the cf_abort commented out:

 if (len(arguments.inStruct.a_agent_first_name) gt 0 OR
 len(arguments.inStruct.a_agent_middle_initial) gt 0 OR
 len(arguments.inStruct.a_agent_last_name) gt 0 OR
                                   len(arguments.inStruct.a_agent_firm_ein)
 gt 0 OR len(arguments.inStruct.a_agent_firm_name) gt 0 OR
 len(arguments.inStruct.a_agent_phone) gt 0 OR

 len(arguments.inStruct.a_agent_phone_ext) gt 0 OR
 len(arguments.inStruct.a_agent_address_1) gt 0 OR
 len(arguments.inStruct.a_agent_address_2) gt 0 OR
                                   len(arguments.inStruct.a_agent_city) gt
 0 OR len(arguments.inStruct.a_agent_state_id) gt 0 OR
 len(arguments.inStruct.a_agent_province) gt 0 OR

 len(arguments.inStruct.a_agent_country_id) gt 0 OR
 len(arguments.inStruct.a_agent_postal_code) gt 0 OR
 len(arguments.inStruct.a_agent_email) gt 0)
                                        {
                                        dbResult =
 request.oEmployer.Ins_Agent_Tbl(arguments.inStruct);
                                        if (dbResult eq 0,)
                                                request.inStruct.l_agent_id
 = listGetAt(dbResult,2);
                                        else
                                                request.inStruct.l_agent_id
 = ;
                                        }
                                         //cf_dump(dbResult);
                                           cf_abort;
                                else
                                        request.inStruct.l_agent_id = ;




 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349844
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


debugging in cfscript

2008-05-20 Thread Richard White
hi,

when debugging with coldfusion tags i use the cfoutput and cfdump tags alot but 
how can i use these tags and the cfabort tag within cfscript, or how can i get 
the same effect as these tags?

thanks

richard 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305740
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: debugging in cfscript

2008-05-20 Thread Aaron Rouse
Depending on where you are in the script it could be as simple as ending the
cfscript then putting in a cfdump and then beginning the cfscript again.  I
often debug small problems within cfscripts by using writeoutput functions
for the values on if statements and other things of that nature.  I suppose
you could create a function that simple dumps out whatever you fed it so
that you could put inline dumps.

On Tue, May 20, 2008 at 12:15 PM, Richard White [EMAIL PROTECTED] wrote:

 hi,

 when debugging with coldfusion tags i use the cfoutput and cfdump tags alot
 but how can i use these tags and the cfabort tag within cfscript, or how can
 i get the same effect as these tags?

 thanks

 richard

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305742
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: debugging in cfscript

2008-05-20 Thread Charlie Griefer
cffunction name=cf_abort output=false returntype=void
 cfabort /
/cffunction

cffunction name=cf_dump output=false returntype=void
 cfargument name=objToDump type=any required=false default= /

 cfdump var=#arguments.objToDump# /
/cffunction

cfscript
 var myArray = newArray(1);
 myArray[1] = Larry;
 myArray[2] = Moe;
 myArray[3] = Curly;

 cf_dump(myArray);
 cf_abort;
/cfscript

On Tue, May 20, 2008 at 10:15 AM, Richard White [EMAIL PROTECTED] wrote:
 hi,

 when debugging with coldfusion tags i use the cfoutput and cfdump tags alot 
 but how can i use these tags and the cfabort tag within cfscript, or how can 
 i get the same effect as these tags?

 thanks

 richard

 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305743
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: debugging in cfscript

2008-05-20 Thread Dominic Watson
 when debugging with coldfusion tags i use the cfoutput and cfdump tags alot 
 but how can i use these tags and the cfabort tag within cfscript, or how can 
 i get the  same effect as these tags? A common practice is to create a udf 
 that wraps the functionality of a cf tag, so:

cffunction name=dump
cfargument name=var type=any required=true
cfargument name=expand type=boolean required=false default=true
cfargument name=label type=string required=false default=

cfdump var=#arguments.var# expand=#arguments.expand#
label=#arguments.label#
/cffunction

cfscript
   aArray = ArrayNew(1);
   aArray[3] = 'fooey';
   dump(aArray);
/cfscript

Dominic
-- 
Blog it up: http://fusion.dominicwatson.co.uk

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305745
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: debugging in cfscript

2008-05-20 Thread Richard White
thanks guys, very neat solution :) 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305747
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4