CFinNC Debugging Advanced Presentation

Comments

There aren't any comments for this presentation.

Add Comment

Comments have been closed.

Transcript

no image

Slide Text

Slide Notes


Advanced ColdFusion Debugging


Advanced
ColdFusion Debugging
Tips and Tricks
Bilal Soylu
      CFinNC 2009

no notes exist for this slide

Agenda


Agenda
The Creds
My Definition
Interactive Debugger
FireBug / ColdFire
Offline Debugging
Time: JVM configuration observations

no notes exist for this slide

The Creds Slide


The Creds Slide
CTO Verian Technologies, Inc. (www.verian.com)
ColdFusion since mid 90’s beginning with Version 1.5
Certified Advanced CF Developer
Contributor to Brainbench CF 8 Exam

no notes exist for this slide

General Definition


General Definition
Definition 1
Detection and rectification of deficiencies in a software code that can cause it to crash, behave erratically, or be susceptible to cracker or hacker attack. In some cases it takes more time to debug a program than to write it. See also bug.
Definition 2
Detection and remedying of existing and potential errors in a product or system before its final acceptance or sale.

no notes exist for this slide

Why should we care


Why should we care
“All software has bugs…”
“…Debugging the Most Time-Consuming Phase of Software Development Lifecycle…”
(Business Wire)
(StackOverflow.com)

Time
Frustration
Quality of Life ;o)

no notes exist for this slide

Debug Space My Definition


Debug Space (My Definition)

no notes exist for this slide

Detection Categories


Detection Categories
Areas
Syntax Errors
Missing attributes, misspelled commands, etc.
Runtime Errors
Exceptions (program ends prematurely etc.)
Logical Errors
Unexpected behaviors
Performance Related
Time / Throughput

no notes exist for this slide

Interactive Debugger in LT 7


Interactive Debugger in LT 7
Step 1: Check CF Configuration
Step 2: Setup CF Eclipse
Step 3: Setup Adobe Extensions
Step 4: Setup Debug Mappings
Step 5: Setup RDS Mappings
Step 6: Configure Debug Perspective

no notes exist for this slide

Getting Ready


Getting Ready
Installation Prerequisites
Installed CF 8 with RDS enabled
Installed JDK / JRE
Download
Eclipse (3.4 or 3.5)
Download Adobe Extensions

no notes exist for this slide

Step 1 ColdFusion side


Step 1: ColdFusion side
Enable RDS (wwwroot\WEB-INF\web.xml) & CF Admin
Enable Line Debugging

no notes exist for this slide

Step 2 CF Eclipse


Step 2: CF Eclipse
Demo
Download and Install CF Eclipse (http://www.cfeclipse.org/update)

no notes exist for this slide

Step 3 CF Extensions for Ecplipse


Step 3: CF Extensions for Ecplipse
Set Perspectives
Set Workspace to webroot
Add Adobe Extensions

no notes exist for this slide

Step 4 Add Debug Mappings


Step 4: Add Debug Mappings
Test configuration / Test Debugger

no notes exist for this slide

Step 5 Add RDS config


Step 5: Add RDS config
Open Prefs
Click Adobe Node
Verify Conn and Debug

no notes exist for this slide

Step 6 Set Debug Perspective


Step 6: Set Debug Perspective
Add initial Debug Config

no notes exist for this slide

Run Examples


Run Examples
Single Template
Custom Tag
Component
Caveats

no notes exist for this slide

Setup Firebug in LT 6


Setup Firebug in LT 6
Step 1: Download and Install FireFox (3.5)
Step 2: Install Firebug Extension
Step 3: Download ColdFire
Step 4: Install ColdFire Extension to FF
Step 5: Install ColdFire Extension to CF
Enjoy !

no notes exist for this slide

Step 2 Installing FireBugColdFire in FF


Step 2: Installing FireBug/ColdFire in FF
Usage Sample

no notes exist for this slide

Step 5 Install ColdFire extension for CF


Step 5: Install ColdFire extension for CF

no notes exist for this slide

Step 5b Switch CF Debug Format


Step 5b – Switch CF Debug Format

no notes exist for this slide

Logging and Try Catch


Logging and Try / Catch
Try/catch requires that you log your errors manually

no notes exist for this slide

Offline Debug in 1


Offline Debug in 1
What happens when you are not there?
Debugging to File system (CF temp directory) using GetTempDirectory(),
e.g. [root]\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\
Flags
To Hide: DebugSilent
<cfset DebugSilent=True>
URL
FORM
To Restrict to Error: DebugOnlyErrorToFile
Indicate Error in File Naming
Caveats:
Extra overhead
File system needs monitoring

no notes exist for this slide

QampA


Q&A
Contact
bilal.soylu@gmail.com
Blog
BonCode.blogspot.com

no notes exist for this slide

JVM Config Observations


JVM Config Observations
Playing with JVM
GC Settings
Memory
The defaults
Memory max 512MB
-XX:+UseParallelGC
Experiments
-XX:PermSize=96m
–Xmx1024m
-XX:+UseConcMarkSweepGC
Profile JVM memory use before finalizing

no notes exist for this slide

Using Service Capture


Using Service Capture
Alternative to Firebug (http://www.kevinlangdon.com/serviceCapture/)
Especially useful with Flex (AMF traffic decoding)
http://[myexample]/flex/DownloadExample1/ShippingDemo.mxml

no notes exist for this slide