ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old December 8th, 2004, 08:37 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 7 m 51 sec
Reputation Power: 42
Asking for help and debugging tips

First, let me remind people that when you post a question about a problem that you are having, post the error message. And if you are posting code, post the line number of the error.

I've also noticed a trend where people paste hundreds of lines of code into a message and ask for help. Please do not do this. Myself and the others trying to answer questions do not have the time to read through all that code. Remove as much extraneous code as you possibly can from the script before you post it. In many cases, you'll find that by simplifying the code you will actually discover the problem for yourself. But even if you can't solve it yourself, posting specific code makes it much easier for us to help you. I'm probably going to start posting links to this message when future threads have large amounts of code pasted.

Remember to use <cfdump> and <cfabort>, these are the best debugging tools that CF developers have! Have a problem with a form field on your action page? Place a <cfdump var="#form#"><cfabort> at the top of the page and confirm that the form scope has the variables and values that you are expecting. <cfdump> works with all ColdFusion data types, so you can dump query result sets, CFC instances, nested arrays of structures, XML document objects, Java objects, and anything else. Use this capability!

Remember that problems with conditional logic are actually among the easiest problems to solve. Remove all the extra code until you are left with only the conditional logic and some text to help you test which condition is running. And remember if you are matching on strings in your conditional that extra spaces will cause otherwise identical strings not to match. Use the trim() function to get rid of extra spaces on either side of a string.

If anyone has tips of their own, please post them to this thread. I'll make it a sticky. Thanks!
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #2  
Old June 8th, 2007, 01:40 PM
Shift4SMS Shift4SMS is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 24 Shift4SMS User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 5 m 51 sec
Reputation Power: 0
The one thing I would add is an expansion of the statement (slightly modified) "Remove as much extraneous code as you possibly. In many cases, you'll find that by simplifying the code you will actually discover the problem for yourself."

<!--- ---> is your friend! I was programming CF for 6+ years before I learned about the CF comment (duhhh), which is different and more powerful than the html comment. Use this to block our entire sections of code until you get the page running without errors and then unblock a piece at a time until you find the offending section.

Hope this helps...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Asking for help and debugging tips


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway