Home
Username:
Password:
ColdFusion MX 7 Advanced Tutorials

Debugging/Troubleshooting / Preventing Problems




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

I wanted to give you a movie just with a brief listing of ways to prevent problems initially, always easier to try and prevent then to try and deal with them and so here's a little list and some of these are obvious but I did want to put them in a full list for you. Always test if variables are defined before trying to use them. You can assign default values using CF param if it's appropriate. If you use the record set builder in Dreamweaver, always click the test button so you can test query output. Now this is an advanced course and you're probably going to be doing joins and more complicated SQL then the record set builder can handle so that might not be appropriate, however if you can it is something to consider using. Use a developmental server so you can turn on debugging in ColdFusion administrator and always view your SQL statements being produced in the debugger. Sometimes that's not obvious, you can't do that but if you turn on the more advanced debugging checkbox which is right above the enable debugging checkbox in the ColdFusion administrator, you will get more information in your debugging. Number six is kind of my big one, double check your code for errors after typing out before you try and run it and depending upon the amount of experience you've had with development you have probably set this up as your system already but if you're fairly new and just finished the basic course and have been playing a little bit always double check your code before you try and run it. Look for misspellings, quotes, pounds, brackets, make sure its all in there. I have a tendency to misspell when I type so that seems to be my most common error. But look at what your most common errors are, in classes I always tell people, everybody has an error that they tend to repeat so look for that one first in your code and don't run your code until you've double checked for that specific error. Be sure the template has been uploaded, that's another thing, if through course we're working right through the testing server so we don't have to worry about that but if you are not, if you have a local copy and need to upload before you run many, many times, because I do classes both ways, many times, its just a matter that they didn't upload the new changes so it's still giving them the same error and their looking at correct code in the page but the incorrect code is still on the server. Also use browser refresh, sometimes that's the issue or try a different browser if it doesn't work in one and you can't figure it out put it in another browser. If it repeats the error then you definitely have a problem, if it doesn't it may be a browser caching issue of the bad page. I keep a local copy and upload to the testing server so I always have a back up, in this course I didn't want you to have to sit and wait and do that all the time so that's why we have it set up a little bit different. Put working code you use often into Dreamweaver snippets, that way you know the code works, the syntax is correct and you don't have to keep rewriting code and making errors. Then just focus on what you need to change or add to that code, I put the changeable code in italics and remove the italics so that when I use that snippet and drop it onto the page I can just zoom through OK the italics is what I need to change. So those are some ideas for preventing problems in your code.

Tutorial Information

Course: ColdFusion MX 7 Advanced
Author: Candyce Mairs
SKU: 33828
ISBN: 1-934743-34-8
Release Date: 2007-11-30
Duration: 6 hrs / 89 lessons
Work Files: Yes
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available