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.
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:
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
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

What's hot

(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
BIOVIA
 
SAP Host Agent x509 authentication
SAP Host Agent x509 authenticationSAP Host Agent x509 authentication
SAP Host Agent x509 authentication
Aliter Consulting
 
Benchmarking like a pro
Benchmarking like a proBenchmarking like a pro
Benchmarking like a pro
Gianluca Sartori
 
Roll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRoll your own FOSS cloud hosting
Roll your own FOSS cloud hosting
Russell Searle
 
Double Sync Replication
Double Sync ReplicationDouble Sync Replication
Double Sync Replication
Lixun Peng
 
Aem offline content
Aem offline contentAem offline content
Aem offline content
Ashokkumar T A
 
Core FP Concepts
Core FP ConceptsCore FP Concepts
Core FP Concepts
Diego Pacheco
 
Time Machine
Time MachineTime Machine
Time Machine
Lixun Peng
 
Configuration Management in WordPress
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
Edmund Turbin
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
Johan Edstrom
 
SAP Rolling Kernel Switch RKS
SAP Rolling Kernel Switch RKSSAP Rolling Kernel Switch RKS
SAP Rolling Kernel Switch RKS
Gary Jackson MBCS
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
Sascha Möllering
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xampp
Lailani Fitria
 
Governor limits
Governor limitsGovernor limits
Governor limits
Shivanath Devinarayanan
 
SAP LVM Custom Instances
SAP LVM Custom InstancesSAP LVM Custom Instances
SAP LVM Custom Instances
Aliter Consulting
 
Event Driven Architecture with Apache Camel
Event Driven Architecture with Apache CamelEvent Driven Architecture with Apache Camel
Event Driven Architecture with Apache Camel
prajods
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 

What's hot (17)

(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
 
SAP Host Agent x509 authentication
SAP Host Agent x509 authenticationSAP Host Agent x509 authentication
SAP Host Agent x509 authentication
 
Benchmarking like a pro
Benchmarking like a proBenchmarking like a pro
Benchmarking like a pro
 
Roll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRoll your own FOSS cloud hosting
Roll your own FOSS cloud hosting
 
Double Sync Replication
Double Sync ReplicationDouble Sync Replication
Double Sync Replication
 
Aem offline content
Aem offline contentAem offline content
Aem offline content
 
Core FP Concepts
Core FP ConceptsCore FP Concepts
Core FP Concepts
 
Time Machine
Time MachineTime Machine
Time Machine
 
Configuration Management in WordPress
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
 
SAP Rolling Kernel Switch RKS
SAP Rolling Kernel Switch RKSSAP Rolling Kernel Switch RKS
SAP Rolling Kernel Switch RKS
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xampp
 
Governor limits
Governor limitsGovernor limits
Governor limits
 
SAP LVM Custom Instances
SAP LVM Custom InstancesSAP LVM Custom Instances
SAP LVM Custom Instances
 
Event Driven Architecture with Apache Camel
Event Driven Architecture with Apache CamelEvent Driven Architecture with Apache Camel
Event Driven Architecture with Apache Camel
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 

Similar to Lucee writing your own debugging template

Lucee writing your own debugging template
Lucee   writing your own debugging templateLucee   writing your own debugging template
Lucee writing your own debugging template
Gert Franz
 
The ABC's of IaC
The ABC's of IaCThe ABC's of IaC
The ABC's of IaC
Steven Pressman, CISSP
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
Daniel Stange
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
Brian Ritchie
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
Arnaud LEMAIRE
 
Cloud Orchestration is Broken
Cloud Orchestration is BrokenCloud Orchestration is Broken
Cloud Orchestration is Broken
Public Broadcasting Service
 
DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.DevOps Fest 2020. immutable infrastructure as code. True story.
DevOps Fest 2020. immutable infrastructure as code. True story.
Vlad Fedosov
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdf
Richard Martens
 
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
Klas Berlič Fras
 
10 Golden Rules for S/4 HANA Migrations
10 Golden Rules for S/4 HANA Migrations10 Golden Rules for S/4 HANA Migrations
10 Golden Rules for S/4 HANA Migrations
Bluefin Solutions
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014
Uri Cohen
 
High Performance Object Pascal Code on Servers (at EKON 22)
High Performance Object Pascal Code on Servers (at EKON 22)High Performance Object Pascal Code on Servers (at EKON 22)
High Performance Object Pascal Code on Servers (at EKON 22)
Arnaud Bouchez
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
satejsahu
 
Midwest PHP - Scaling Magento
Midwest PHP - Scaling MagentoMidwest PHP - Scaling Magento
Midwest PHP - Scaling Magento
Mathew Beane
 
Alternative Dispatcher Layer Overview
Alternative Dispatcher Layer OverviewAlternative Dispatcher Layer Overview
Alternative Dispatcher Layer Overview
Square Cloud
 
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
Kathy Brown
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization
Ganesan Narayanasamy
 
Staged Patching Approach in Oracle E-Business Suite
Staged Patching Approach in Oracle E-Business SuiteStaged Patching Approach in Oracle E-Business Suite
Staged Patching Approach in Oracle E-Business Suite
vasuballa
 
Chris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing workChris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing work
Chris O'Brien
 

Similar to Lucee writing your own debugging template (20)

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

Recently uploaded

Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 

Recently uploaded (20)

Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 

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.
  • 5.
  • 6.
  • 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:
  • 11.
  • 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
  • 13.
  • 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

  1. http://www.carehart.org/blog/client/index.cfm/2010/3/12/ultimate_cf_debugging_output_template_alternatives
  2. 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
  3. 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
  4. 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.
  5. 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
  6. 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.
  7. 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
  8. 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
  9. This is an important key. It contains all the CFM/CFC templates that have been called
  10. 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
  11. Talk about
  12. 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