In any platform of dynamic web development, it frequently becomes necessary to debug your scripts by ensuring that the values that are being passed to a page by a form are the same values that the page is working with when attempting to run its own processes. Development with Adobe ColdFusion is no exception. Fortunately, it is possible to easily view a .CFM module's active variables on the screen with one of ColdFusion's built-in tags.
Open the page that is the action target of the form you are debugging.
Immediately after the opening <body> tag, insert the following:
<cfdump var = "#variable#">
Substitute the form variable you are testing for the word variable. Be sure to keep the quotes and pound signs in place.
Repeat the two tags for every form variable you wish to dump. When you are finished, save and publish the page.
Submit the form you are testing on your ColdFusion server. You will see what, if any, values are being passed to the page for each form variable.
- Photo Credit Comstock/Comstock/Getty Images
How to Calculate Delta Between Two Numbers
Whether it’s the location of an electron in an atom or the velocity of a falling meteorite, properties are always changing somewhere...
How to Declare Variables As a Form In VBA
Microsoft Visual Basic for Application (VBA) controls use variables to store temporary information in the Access procedures, Word modules or Excel workbooks...
How to Remove Your First Character in ColdFusion
The CodlFusion programming language contains many options for working with variables that are strings of text. You can count the number of...