SlideShare a Scribd company logo
Debugging templates DIY
Gert Franz
Rasia GmbH
MY EVOLUTION
Assembler  Basic  Clipper  Pascal  Delphi  Java  CFML  Lucee
WHO AM I?
• Gert Franz
– Involved with Lucee and Railo since day 1
– Into CFML for 17 years
– DBA, System architect
– CTO Rasia Ltd, CTO Rasia CH
• Rasia is founding Member of the Lucee
association
WHO AM I?
• Studied Astrophysics in München
• Basic, dBase, Clipper, Visual Basic, Delphi, Java
• Performance, DB & Code Tuning is my professional
Hobby
• I live in Switzerland
• Lucee training, consulting, support etc.
Lucee   writing your own debugging template
Lucee   writing your own debugging template
Official definition:
Determines how to display
debugging output
DEBUGGING IN LUCEE
• Consists of 2.5 parts
• Enabling debugging
• Selecting the debugging template
• Using the debugging logs
OK SO LET'S HAVE A LOOK
WHAT YOU END UP WITH:
Lucee   writing your own debugging template
TEMPLATES? WHAT? WHERE?
• A debugging template in Lucee is:
– A cfc located in a specific folder
– Containing a body needed for configuration
– Containing a method called "output" which handles
the display of the data
Lucee   writing your own debugging template
LET'S INSPECT THE CLASSIC.CFC TEMPLATE
• Content of the body of the CFC
– Is not necessary for execution
– Only cofiguration
• Output method
• Arguments of the output method
ARGUMENTS SCOPE OF FUNCTION OUTPUT
• Custom
• Debugging
• Context
A CLOSER LOOK AT THE DEBUGGING ARGUMENT
• The debugging argument contains all
important information collected througout a
request:
DATASOURCES
ALL DUMPS WITH TARGET DEBUG
• Great – this does not work ATM, I filed a ticket
that it is broken
ALL EXCEPTIONS (SILENT OR NOT)
HISTORY (CALLSTACK)
• The callstack tells us, in what order
(by ID) the templates have been
called
• This would allow us to display the
callstack
IMPLICIT ACCESS
• In this section you get all the
variables, that are called by
following the rules of scope
cascading. If you see none,
two reasons:
– Feature is disabled
– Your programming is impecable
PAGEPARTS
• This feature has been implemented for one of
the upcomin tools which will tell you the slow
parts in your application
PAGES
QUERIES
TIMERS
• Mostly used for testing
• If you don't want your output to be disturbed
by the timer output
• Generated by the tag CFTIMER
TRACES
• If you want to follow a variables state
througout the request, you can use the tag
CFTRACE
• It is kind of like a dump output="debug"
ANY IDEAS FOR IMPORVEMENTS
• Make the layout nicer
• Toggle sections
• Group items
• Show percentages and heat maps
ADDITIONAL IDEAS
• Callstack
• Session size information
• Filtering, either client or server side
SO HOW DO WE WRITE OUR OWN?
• Simple. Create a CFC
– Where?
• Server side:
– server-config-dir/context/context/admin/debug
• Webcontext side
– web-context-dir/context/admin/debug
SO HOW DO WE WRITE OUR OWN?
• Name the CFC individually so that it does not
get overwritten
• Add a body and one method like follows
SO HOW DO WE WRITE OUR OWN?
component extends="Debug" output="no"
fields=array(
group("Execution Time","Execution times for templates",3),
field("Min Exec Time","minimal","0",true,{_appendix:"micros",_bottom:"Exec time templates"},"text40"),
field("Highlight","highlight","250000",true,{_appendix:"micros",_bottom:"Highlight "},"text50"),
);
string function getLabel(){}
string function getDescription(){}
string function getid(){}
void function onBeforeUpdate(struct custom){ }
void function output(required struct custom, required struct debugging, string context="web") {
… here comes the output …
}
}
CFADMIN ACTION="SURVEILLANCE"
• This is a very interesting tag that allows you to
see what's going on on your server
• It also contains the debugging information
generated up to that time
LET'S HAVE A LOOK
• I am creating several calls and then do a
cfadmin action="surveillance"
• Let's inspect the code from there.
BTW• I am working on a debugging console again 

More Related Content

PPTX
Caching strategies with lucee
KEY
Perl in Teh Cloud
PDF
Upgrading or migrating to a higher AEM version - Planning and process
PDF
SAP LVM Post Copy Automation Integration
PDF
SAP LVM Custom Operations
PPS
Difference WAMP and XAMPP
ODP
20110701 zsc2011-advanced proxying-formatted
PDF
Drupal 7 performance and optimization
Caching strategies with lucee
Perl in Teh Cloud
Upgrading or migrating to a higher AEM version - Planning and process
SAP LVM Post Copy Automation Integration
SAP LVM Custom Operations
Difference WAMP and XAMPP
20110701 zsc2011-advanced proxying-formatted
Drupal 7 performance and optimization

What's hot (17)

PDF
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
PDF
SAP Host Agent x509 authentication
PPTX
Benchmarking like a pro
PPT
Roll your own FOSS cloud hosting
PDF
Double Sync Replication
PDF
Aem offline content
PDF
Core FP Concepts
PDF
Time Machine
PDF
Configuration Management in WordPress
PPTX
Using Apache Camel as AKKA
PDF
SAP Rolling Kernel Switch RKS
PPTX
Infrastructure as Code
PPTX
Tutorial sederhana netbeans & xampp
PPTX
Governor limits
PDF
SAP LVM Custom Instances
PDF
Event Driven Architecture with Apache Camel
PPTX
Learn from my Mistakes - Building Better Solutions in SPFx
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
SAP Host Agent x509 authentication
Benchmarking like a pro
Roll your own FOSS cloud hosting
Double Sync Replication
Aem offline content
Core FP Concepts
Time Machine
Configuration Management in WordPress
Using Apache Camel as AKKA
SAP Rolling Kernel Switch RKS
Infrastructure as Code
Tutorial sederhana netbeans & xampp
Governor limits
SAP LVM Custom Instances
Event Driven Architecture with Apache Camel
Learn from my Mistakes - Building Better Solutions in SPFx
Ad

Similar to Lucee writing your own debugging template (20)

PPTX
Lucee writing your own debugging template
PPTX
The ABC's of IaC
PPTX
Setting Up CircleCI Workflows for Your Salesforce Apps
PPTX
Profiling and Tuning a Web Application - The Dirty Details
KEY
Standardizing and Managing Your Infrastructure - MOSC 2011
PPT
Oracle Apps CX Debugging Extensions Method
PPTX
DevOps, A brief introduction to Vagrant & Ansible
PPTX
Cloud Orchestration is Broken
PDF
DevOps Fest 2020. immutable infrastructure as code. True story.
PDF
APEX Application Lifecycle and Deployment 20220714.pdf
PPTX
Basic Application Performance Optimization Techniques (Backend)
PPTX
10 Golden Rules for S/4 HANA Migrations
PPTX
Cloudify workshop at CCCEU 2014
PDF
High Performance Object Pascal Code on Servers (at EKON 22)
PPT
Intro to Service Worker API and its use cases
PPTX
Midwest PHP - Scaling Magento
PDF
Alternative Dispatcher Layer Overview
PDF
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
PDF
OpenPOWER Application Optimization
PPT
Staged Patching Approach in Oracle E-Business Suite
Lucee writing your own debugging template
The ABC's of IaC
Setting Up CircleCI Workflows for Your Salesforce Apps
Profiling and Tuning a Web Application - The Dirty Details
Standardizing and Managing Your Infrastructure - MOSC 2011
Oracle Apps CX Debugging Extensions Method
DevOps, A brief introduction to Vagrant & Ansible
Cloud Orchestration is Broken
DevOps Fest 2020. immutable infrastructure as code. True story.
APEX Application Lifecycle and Deployment 20220714.pdf
Basic Application Performance Optimization Techniques (Backend)
10 Golden Rules for S/4 HANA Migrations
Cloudify workshop at CCCEU 2014
High Performance Object Pascal Code on Servers (at EKON 22)
Intro to Service Worker API and its use cases
Midwest PHP - Scaling Magento
Alternative Dispatcher Layer Overview
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
OpenPOWER Application Optimization
Staged Patching Approach in Oracle E-Business Suite
Ad

Recently uploaded (20)

PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
medical staffing services at VALiNTRY
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPT
Introduction Database Management System for Course Database
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
System and Network Administration Chapter 2
PPTX
L1 - Introduction to python Backend.pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
AI in Product Development-omnex systems
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
ai tools demonstartion for schools and inter college
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
medical staffing services at VALiNTRY
2025 Textile ERP Trends: SAP, Odoo & Oracle
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Internet Downloader Manager (IDM) Crack 6.42 Build 41
How Creative Agencies Leverage Project Management Software.pdf
Operating system designcfffgfgggggggvggggggggg
Understanding Forklifts - TECH EHS Solution
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Introduction Database Management System for Course Database
ISO 45001 Occupational Health and Safety Management System
System and Network Administration Chapter 2
L1 - Introduction to python Backend.pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 2 - PM Management and IT Context
AI in Product Development-omnex systems
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
ai tools demonstartion for schools and inter college

Lucee writing your own debugging template

  • 1. Debugging templates DIY Gert Franz Rasia GmbH
  • 2. MY EVOLUTION Assembler  Basic  Clipper  Pascal  Delphi  Java  CFML  Lucee
  • 3. WHO AM I? • Gert Franz – Involved with Lucee and Railo since day 1 – Into CFML for 17 years – DBA, System architect – CTO Rasia Ltd, CTO Rasia CH • Rasia is founding Member of the Lucee association
  • 4. WHO AM I? • Studied Astrophysics in München • Basic, dBase, Clipper, Visual Basic, Delphi, Java • Performance, DB & Code Tuning is my professional Hobby • I live in Switzerland • Lucee training, consulting, support etc.
  • 7. Official definition: Determines how to display debugging output
  • 8. DEBUGGING IN LUCEE • Consists of 2.5 parts • Enabling debugging • Selecting the debugging template • Using the debugging logs
  • 9. OK SO LET'S HAVE A LOOK
  • 10. WHAT YOU END UP WITH:
  • 12. TEMPLATES? WHAT? WHERE? • A debugging template in Lucee is: – A cfc located in a specific folder – Containing a body needed for configuration – Containing a method called "output" which handles the display of the data
  • 14. LET'S INSPECT THE CLASSIC.CFC TEMPLATE • Content of the body of the CFC – Is not necessary for execution – Only cofiguration • Output method • Arguments of the output method
  • 15. ARGUMENTS SCOPE OF FUNCTION OUTPUT • Custom • Debugging • Context
  • 16. A CLOSER LOOK AT THE DEBUGGING ARGUMENT • The debugging argument contains all important information collected througout a request:
  • 18. ALL DUMPS WITH TARGET DEBUG • Great – this does not work ATM, I filed a ticket that it is broken
  • 20. HISTORY (CALLSTACK) • The callstack tells us, in what order (by ID) the templates have been called • This would allow us to display the callstack
  • 21. IMPLICIT ACCESS • In this section you get all the variables, that are called by following the rules of scope cascading. If you see none, two reasons: – Feature is disabled – Your programming is impecable
  • 22. PAGEPARTS • This feature has been implemented for one of the upcomin tools which will tell you the slow parts in your application
  • 23. PAGES
  • 25. TIMERS • Mostly used for testing • If you don't want your output to be disturbed by the timer output • Generated by the tag CFTIMER
  • 26. TRACES • If you want to follow a variables state througout the request, you can use the tag CFTRACE • It is kind of like a dump output="debug"
  • 27. ANY IDEAS FOR IMPORVEMENTS • Make the layout nicer • Toggle sections • Group items • Show percentages and heat maps
  • 28. ADDITIONAL IDEAS • Callstack • Session size information • Filtering, either client or server side
  • 29. SO HOW DO WE WRITE OUR OWN? • Simple. Create a CFC – Where? • Server side: – server-config-dir/context/context/admin/debug • Webcontext side – web-context-dir/context/admin/debug
  • 30. SO HOW DO WE WRITE OUR OWN? • Name the CFC individually so that it does not get overwritten • Add a body and one method like follows
  • 31. SO HOW DO WE WRITE OUR OWN? component extends="Debug" output="no" fields=array( group("Execution Time","Execution times for templates",3), field("Min Exec Time","minimal","0",true,{_appendix:"micros",_bottom:"Exec time templates"},"text40"), field("Highlight","highlight","250000",true,{_appendix:"micros",_bottom:"Highlight "},"text50"), ); string function getLabel(){} string function getDescription(){} string function getid(){} void function onBeforeUpdate(struct custom){ } void function output(required struct custom, required struct debugging, string context="web") { … here comes the output … } }
  • 32. CFADMIN ACTION="SURVEILLANCE" • This is a very interesting tag that allows you to see what's going on on your server • It also contains the debugging information generated up to that time
  • 33. LET'S HAVE A LOOK • I am creating several calls and then do a cfadmin action="surveillance" • Let's inspect the code from there.
  • 34. BTW• I am working on a debugging console again 

Editor's Notes

  • #8: http://www.carehart.org/blog/client/index.cfm/2010/3/12/ultimate_cf_debugging_output_template_alternatives
  • #9: I used to have a debugging template in the past, where I was able to see the debugging information of the last 10 requests that have ran on a server. It was called debugging-console. From that the debugging console the current log for debugging information was created
  • #11: We designed this page to mimic the classic debugging template we all know from ACF. That hasn't changed in YEARS Problems with this template: Very hard to read Very long Not the most effective way to help you debug your code
  • #12: The information that you get is ok, it is necessary and important information. But hey, try to debug some code created with Coldbox or any other more sophisticated framework.
  • #13: Let's have a look where the debugging templates are located Be aware, that if you change one of the existing debugging templates, they might be overwritten by any update that you make on Lucee When Lucee starts, it deploys ist default files into the different folders. So, either: Create your own new debugging template based on an existing one (saved with a new filename) Create the debugging template locally in the WEB-INF folder of your web context
  • #16: While we can ignore the third argument (it will contain mostly the string "web"), the other two are very interesting Custom contains the configuration data, entered when selecting the debugging template in the Lucee admin And Debugging will contain the actual data, which is highly interesting.
  • #21: History (calling history for the stacktrace) pageParts (for one of the upcoming tools) Pages (template execution times etc.) Queries (Query execution times etc.) Timers Traces
  • #22: Ok, what is this? The implicitAccess gives you information about the variables that have NOT been properly scoped. Like query variables within functions or cgi and form variables without their corresponding scope preceding. Be aware that this feature eats loads of performance. DON'T turn it on in production
  • #24: This is an important key. It contains all the CFM/CFC templates that have been called
  • #25: A column which is important is the usage column. It will tell us which column of the resulted query has been used in the request and which one hasn't. This allows us to improve the performance and the data transfer between the DB server and the Lucee server
  • #30: Talk about
  • #32: If you need some help with the fields on top, have a look at other cfc's in the context directory. ALL of them have similar entries