User Guide

Table Of Contents
270 Chapter 12: Building Custom CFXAPI Tags
Debugging C++ CFX tags
After you configure a debugging session, you can run your custom tag from within the debugger,
set breakpoints, single-step, and so on.
Debugging in Windows
You can debug custom tags within the Visual C++ environment.
To debug C++ CFX tags in Windows:
1.
Build your C++ CFX tag using the debug option.
2.
Restart ColdFusion.
3.
Start Visual C++.
4.
Select Build > Start Debug > AttachProcess.
5.
Select jrunsvc.exe.
Macromedia recommends that you shut down all other Java programs.
6.
Execute any ColdFusion page that calls the CFX tag.
7.
Select File > Open to open a file in VisualDev in which to set a breakpoint.
8.
Set a breakpoint in the CFX project.
The best place is to put it in
ProcessRequest(). Next time you execute the page you will hit
the breakpoint.
Registering CFX tags
To use a CFX tag in your ColdFusion applications, first register it in the Extensions, CFX Tags
page in the ColdFusion MX Administrator.
To register a C++ CFX tag:
1.
In the ColdFusion MX Administrator, select Extensions > CFX Tags to open the CFX Tags
page.
2.
Click Register C++ CFX.
3.
Enter the Tag name (for example, cfx_MyNewTag).
4.
If the Server Library .dll field is empty, enter the filepath.
5.
Accept the default Procedure entry.
6.
Clear the Keep library loaded box while developing the tag.
For improved performance, when the tag is ready for production use, you can select this option
to keep the DLL in memory.
7.
(Optional) Enter a description.
8.
Click Submit.
You can now call the tag from a ColdFusion page.