step through your cfml code with fusiondebug charlie arehart [email protected]

20
Step Through Your CFML Code With FusionDebug Charlie Arehart [email protected]

Upload: zoe-parrish

Post on 27-Mar-2015

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Step Through Your CFML Code With FusionDebug

Charlie [email protected]

Page 2: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Topics

Introduction to Step Debugging FusionDebug Features FusionDebug Demo Benefits Over

CFDUMP/CFOUTPUT Other Features, Learning More,

Gotchas, Pricing, FAQs, etc.

Page 3: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

About Your Speaker Independent consultant Since Sept 2006

Formerly CTO, New Atlanta (BlueDragon) 9 yrs CF experience (24 in Enterprise IT)

Member, Adobe Community Experts Co-author, ColdFusion MX Bible (Wiley)

Frequent contrib. to ColdFusion Dev Journal President, Atlanta ColdFusion User Group Past accomplishments of note

Tech Editor, CFDJ (2001-2003) Certified Adv CF Developer (4, 5, MX), Instructor

Frequent speaker: UGs, conf’s worldwide

Page 4: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Introduction to Step Debugging Understanding interactive

debugging What can it do for you?

Past debugging solutions (CF4, 5) No current or discussed plans for

CFMX FusionDebug from Intergral

CFML step debugging for CFMX 6.1/7+

Page 5: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

About FusionDebug Is an Eclipse (3.1, 3.2) plug-in

You don’t NEED to use Eclipse for editing Can continue to edit in DWMX, CF Studio,

HomeSite+, etc. Do need to download Eclipse

or use with Flex Builder, which is Eclipse; or CFEclipse if you have it installed already

Requires just a minor change in JVM config for CFMX server Add a couple JVM entries, name a port for

debugger to listen on You then do a minor setup in Eclipse to

enable debugging against that server All of the above is well-documented in the

FusionDebug User Guide, free online

Page 6: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

FusionDebug Features Can step through code, including tags, functions,

CFCs, includes, custom tags, and so on As well as stepping through a page, you can also Step

Into (or out of) sub tags, CFC calls and function calls Can list all variable and scopes

View all scopes available to your page and view anything stored within. See values change as you step through page

Expression Watcher Create arbitrary expressions, from simply outputting a

variable to showing the result of an if condition and the Expression Watcher will dynamically evaluate them

Query Support Open queries to see row data, column names and data

types. Also, when looping through a query the Current Query feature lets you know exactly which row you’re on

Page 7: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

FusionDebug Demo

Let’s see it in action

Page 8: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Demo Features Enabled debugging, stepping through

code Enabled watches and setting variables

can do with right-click on var/expression Showed simple cf code (CF Example

Apps) Set variables on the fly Showed query data in variables pane

Showed CFC-based code (Model Glue) Showed scopes available in CFC methods

var and this scopes Showed how stack is interactive

click to jump to lines in chain above current instruction

Showed debugging web service code Showed debugging Flex apps

Page 9: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Benefits Over CFDUMP/CFOUTPUT Can debug when a CFOUTPUT/CFDUMP may not be

possible What are some examples?

CFCOMPONENT/CFFUNCTION OUTPUT=false CFSILENT When generating XML

What other tags may help in the above cases? Can debug without having to rely on finding the output

of CFLOG or CFTRACE (or enabling the latter) Can debug without needing to change code Can debug requests from Flex, Ajax, or as web

service Can debug when someone besides the developer is

calling a template Can debug against production Can debug on remote machine Can change the value of variables on the fly during

execution

Page 10: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Benefits Over CFDUMP/CFOUTPUT Can debug in situations where a

simple CFOUTPUT/CFDUMP would not suffice (powerful Variables, Expressions panes)

Can use the debugger to understand the flow of execution of the request (help newcomers to your code, or to CFML in general)

Can debug in situations where you don't even know where in a complex app to try to do CFOUTPUT or CFDUMP

Page 11: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Benefits Over CFDUMP/CFOUTPUT Can view call stack during

execution Can view the Java classes called

to execute your code See

http://www.fusion-reactor.com/fusiondebug/support.html#config2

And that’s not even all of them

Page 12: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Other Features Flex and FusionDebug

Can work alongside the Flex Debugger to debug any ColdFusion (.cfc) code being used within a Flex project

Debugging perspectives switch automatically between debugging Flex and CFML

Can also debug CFCs called from Flex even without using FlexBuilder

Can debug CFCs called from Flex, Flash Remoting, Ajax, web services, or CFMX gateways (SMS, event, etc.) as they call CFCs

Page 13: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Learning More Documentation (very good) available

online www.Fusiondebug.com User guide walks through configuration of the

CF Server, Eclipse, and use of FusionDebug Several Captivate demos

Available CFML templates to test with Great to get started, to work through initial

introductory features and challenges Rather than jumping into the middle of

debugging a big app as your first test I’ve started a series of blog entries on it

http://carehart.org/blog/client/index.cfm/fusiondebug

Page 14: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Gotchas: Using FD Breakpoints remain alive for any user (not just

debugging developer) if debug session active If any user runs the request—they will see page hang Only developer with FD open sees it’s stopped on line This is unlike CF4/5 debugging, so be aware Can use “skip all breakpoints” option to temporarily disable

in multi-user environments Be careful holding breakpoint within CFLOCK or

CFTRANSACTION tags for too long (impacts other users in other pages)

Can set breakpoint on non-CFML or blank line, but won’t fire May not fire if on CFSCRIPT or CFRETURN and in some other

instances See:

http://www.fusion-reactor.com/fusiondebug/support.html#breakpoints4

Can try to “set variable” for query column but won’t take When setting variable that can be eval’ed as expression

(555-0002), will do math so surround it in quotes to coerce as string

Page 15: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Gotchas: FD Setup FD has only minor impact when debugging not

active, due to changes made in jvm.config So can run in production, but perhaps should think

twice When setting port in Debug settings, it should

be that for FD, not the web server serving CFML pages

If using FusionReactor (Intergral’s CF monitor tool), should disable “crash protection” feature

If you CFEclipse and don’t see line pointer highlighted, can configure that See

http://www.fusion-reactor.com/fusiondebug/support.html#cfeclipse2

Firewalls or port restrictions can get in the way sometimes

Page 16: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Troubleshooting If you see no CIP moving with debugging

be sure to associate debug session source code properties with a project, not the filesystem (see docs for steps)

If debugging just stops, you may have the CFMX page request timeout that’s killing the page See Admin “Timeout Requests after x seconds” This is disabled by default in 6.1, enabled by

default in 7 If a runtime error occurs, FD will also seem

to stop (but error has been sent to the browser)

A few others listed in docs (above items are not, currently)

Page 17: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Pricing, Discounts, Trials

List price: US$ 299 Available 10% Discount Code:

CFCOMMUNITY Priced per seat, available volume

discounts Available free trial (20 days) I’ve arranged 2 licenses to give

away tonight

Page 18: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

FAQs Does FusionDebug work with BlueDragon?

Not currently. They are in talks But you could install free Dev edition of CFMX and

debug against that Does it work with CF4 or 5?

No, it is specific to CFMX Can it work without Eclipse?

No, it is specific to Eclipse Must I use/learn how to use Eclipse?

Nothing more than what I’ve shown here, really Must I use/learn how to use CFEclipse?

No, FusionDebug is not connected to CFEclipse You can use your favorite CFML editor to edit Just use FD to do debugging

How do I get support? Intergral offers free email support: support@fusion-

reactor.com What’s with the name/spelling “Intergral”?

Formed from Internet and Integration

Page 19: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Conclusion Great solution, finally, for CFML

debugging Sure, it costs money, but will pay for

itself if you’ll benefit from debugging Some debugging naysayers. To each his

own Intergral support has been great

Available free support at [email protected]

Very interested in supporting community

Page 20: Step Through Your CFML Code With FusionDebug Charlie Arehart charlie@carehart.org

Questions on presentation Charlie Arehart

[email protected]

Also available for setup and implementation consulting As well as other developer

productivity coaching, system admin and tuning support , and more

Remote or on-site