• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using Breakpoints in CFCs

New Here ,
May 05, 2010 May 05, 2010

Copy link to clipboard

Copied

I am working on debugging an application running against CF 9 locally an hitting an Oracle 9i database. I can't seem to get a breakpoint to fire inside a CFC. Is there any way to get this to work? What are the normal procedures used to do line-debugging within a CFC?

Another interesting problem is that the application caches its CFCs. I don't know if that makes it impossible to debug since the CFCs are loaded into either the Application or Session scopes early on in processing.

Jason

TOPICS
Builder

Views

298

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2010 May 06, 2010

Copy link to clipboard

Copied

LATEST

I played with this a bit and found a solution. Interestingly enough, once you are in debugging mode you can insert breakpoints into CFCs. That includes CFCs that are cached in memory. So the easiest way to get into a CFC in debugging mode is to put a breakpoint in your .cfm file just before the call to the CFC. Then Step Into the CFC. It will open the CFC code and you can insert additional breakpoints at that time. You can step through line-by-line, or just continue processing and jump to the next breakpoint.

For anyone else using this solution, you should also include a breakpoint both before the call to the CFC as well as after the CFC call so that once you return from the CFC, you will break again rather than just finishing processing of the page.

Jason

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation