Welcome!

You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion

ColdFusion: Article

FusionDebug Tips, Tricks, and Traps

Going beyond the basics

FusionDebug is an easy straightforward tool, but if you leverage the experience of others, you can be even more productive.

Elsewhere in this issue, Jeff Houser introduces the FusionDebug interactive step debugger. I'd like to carry that discussion a bit farther and share various tips, tricks, and traps I've learned from my experience with the tool and that I've gleaned from available FusionDebug resources. I've been using FusionDebug (FD) for a couple of months now and am a fan.

First I'd like to share some general tips that address some common questions or concerns I've observed, broken down into tips on installation and general use. These should help you appreciate the tool's use and how to make the most of its available features.

Then I'd like to share some tricks or features that you may not readily notice that will make the tool still more useful. Finally, I'll share some traps or problems that you may encounter and how to resolve them.

Tips on Getting Started
Why Bother Using a Debugger?
Perhaps the first and most important tip to share is my perspective on why I think FusionDebug is an important tool. I realize that there are some who dismiss it or may simply feel that there's nothing it can do that CFDUMP or CFOUTPUT can't. I disagree and have addressed those concerns in the first two entries in a series in my blog at http://carehart.org/blog/client/index.cfm/fusiondebug.

What If You Have Problems Using or Installing the Tool?
If you have problems using or installing it, you'll find that FusionDebug support is great. The folks at Intergral, who also make FusionReactor, offer free support for the tool at support@fusion-reactor.com.

How Do You Learn About Using and Installing the Tool?
The vendor's site, at www.fusiondebug.com, offers several very useful resources, including a well-done User Guide and Captivate videos showing how to use the tool, all online and free. There are also ample support FAQs and articles on the site to help solve common installation and troubleshooting glitches.

"I Really Don't Want to Switch to Eclipse"
Here's really good news: you don't have to switch to Eclipse. Yes, the tool does run atop Eclipse, as Jeff explains, but you don't have to give up your favorite CFML editor, whether it's Dreamweaver, HomeSite+, or something else. Use those for editing, and fire up Eclipse (and FD) when you debug.

And you don't necessarily have to install Eclipse, as you may already have it installed. Are you using FlexBuilder? That, too, is an implementation of a commercial plug-in atop Eclipse. You could add FD to that. If you do, when you're debugging Flex apps the tool will switch "perspectives" when control passes from the Flex app to the CFML page it calls.

"I Don't Want to Risk Hurting My Current Eclipse Implementation"
On the other hand, you may want to think twice about installing FusionDebug on top of FlexBuilder or even the CFEclipse-based implementation of Eclipse you may have. If you have any concerns about one plug-in hurting another, remember, you can install more than one copy of Eclipse. When you download it from Eclipse.org, it's just a zip full of files that you extract to a directory. It's okay to install it more than once in a different directory.

Along the same lines, another reason not to install FD atop a FlexBuilder install is if you're running the FlexBuilder trial. When it expires, you'll no longer be able to open that version of Eclipse.

Tips on General Use
Does It Just Debug CFM Pages? I'd Like to Debug CFCs and Calls from Flex, AJAX, Web Services, and Such
Great news: it not only debugs CFM pages but CFCs as well. Regardless of whether you instantiate the CFC in CFML or invoke it via Flex, AJAX, Web Services, Flash or Flash Remoting, or CFMX 7's gateways, FusionDebug will intercept the request.

More than that, the tool is savvy enough to recognize that there are special variables inside a CFC or method, and it will show the var (function local scope) and the "this" scopes in the "variables" pane.

Further, when debugging in a CFC method, there will be additional information in the "stack trace" pane. This is the pane (top left as typically configured in FusionDebug) that shows the filename and line number of the line where control has stopped. When control is stopped in a CFC method, this will also show the function name for the method.

Can It Debug CFSCRIPT Code?
Again, for some reason, many seem to have low expectations for the tool and often ask if it can debug code in CFSCRIPT. It absolutely can.

What Does "Step Into" Mean?
"Step into", when used on a line that would go into a new  file such as a CFC method, CFINCLUDE, or custom tag, will open that new file and show the first line of CFML code in that file.

What Does the User See While a Page Is Being Debugged?
When a browser requests a page that's being debugged and has stopped at a breakpoint, it will appear to be hung until the code sends output.

I Want to Be Able to See the Output Being Generated During Debugging
Following on to the previous tip, you may not see the output being sent to the browser while in the midst of processing breakpoints because ColdFusion buffers output until the page completes or the page buffer fills, or a CFFLUSH tag is executed. While it would be nice if the tool offered a pane to see the output as it's being generated, you have a couple of other options if you really want to see the output during debugging. You could insert CFFLUSH tags periodically in the page, or use the available CFFLUSH INTERVAL attribute to cause flushing after a certain number of bytes. Just be aware that, as explained in the CF docs, the browser may not display partial-page output if enough data hasn't been sent or until certain tags are closed (e.g., images, tables, and frames).


More Stories By Charlie Arehart

A veteran ColdFusion developer since 1997, Charlie Arehart is a long-time contributor to the community and a recognized Adobe Community Expert. He's a certified Advanced CF Developer and Instructor for CF 4/5/6/7 and served as tech editor of CFDJ until 2003. Now an independent contractor (carehart.org) living in Alpharetta, GA, Charlie provides high-level troubleshooting/tuning assistance and training/mentoring for CF teams. He helps run the Online ColdFusion Meetup (coldfusionmeetup.com, an online CF user group), is a contributor to the CF8 WACK books by Ben Forta, and is frequently invited to speak at developer conferences and user groups worldwide.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
SYS-CON Events announced today that mruby Forum will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. mruby is the lightweight implementation of the Ruby language. We introduce mruby and the mruby IoT framework that enhances development productivity. For more information, visit http://forum.mruby.org/.
Digital transformation is changing the face of business. The IDC predicts that enterprises will commit to a massive new scale of digital transformation, to stake out leadership positions in the "digital transformation economy." Accordingly, attendees at the upcoming Cloud Expo | @ThingsExpo at the Santa Clara Convention Center in Santa Clara, CA, Oct 31-Nov 2, will find fresh new content in a new track called Enterprise Cloud & Digital Transformation.
Most technology leaders, contemporary and from the hardware era, are reshaping their businesses to do software. They hope to capture value from emerging technologies such as IoT, SDN, and AI. Ultimately, irrespective of the vertical, it is about deriving value from independent software applications participating in an ecosystem as one comprehensive solution. In his session at @ThingsExpo, Kausik Sridhar, founder and CTO of Pulzze Systems, will discuss how given the magnitude of today's applicati...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
SYS-CON Events announced today that NetApp has been named “Bronze Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. NetApp is the data authority for hybrid cloud. NetApp provides a full range of hybrid cloud data services that simplify management of applications and data across cloud and on-premises environments to accelerate digital transformation. Together with their partners, NetApp emp...
In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...