2022.2

Table Of Contents
l
Right-clickanenabledscriptintheScriptspanelandchooseDebugfromthecontextualmenu.
TheScriptDebuggerwillpauseandacceptinputassoonasitprocessestheselectedscript.
Iftheselectedscriptisneverprocessed,amessagewillpopup.Thiscanhappenwhen:
l
Theselectorhasnomatchesatanytime.(Thismaydependonotherscripts,sincescriptscan
addorremovecontent.)
l
Thescriptisexcludedthroughthepropertiesofitsparentfolder.
ForanexplanationofthebuttonsintheScriptDebugger,see"ScriptDebugger"onpage915.
Testingforspeedissues
Tomeasurethetimethattheexecutionofscriptswilltake:
l
OntheContextmenu,clickProfile scripts.
Profilingmeansrunningthescriptsinthetemplate,withthecurrentrecord,toseehowfastscriptsin
theScriptspaneexecute.Ithelpsgreatlyintroubleshootingperformanceissuescausedbyscripts.
AfterrunningtheScriptProfileryoucanseeinwhichsectionsthescripthasrun:
l
HoverthemouseoveravalueinthecolumnCounttoseethenumberoftimesthatthescripthas
run,persection.
Youcanalsoseethebreakdownoftheexecutiontimeacrossdifferentexecutionstages:
l
HoverthemouseoveravalueinthecolumnElapsedtoseethetimeelapsed(inmilliseconds)
sincethestartofthesession.IntheScriptsProfiler,thescriptsarebydefaultsortedbasedonthe
valuesintheElapsedcolumn,fromhightolow.
l
HoverthemouseoveravaluethecolumnDeltatoseethedifferencebetweenthetimeelapsed
(inmilliseconds)intheprevioussessionandinthecurrentsession.
Thescriptexecutionstagesare:
Query:thetimeittakestofindtheselectorinthetemplate.
Tip: Lookingfortextisaratherlengthyoperation.UseanIDorclass(possiblyincombination
withatext)insteadofatextselectortomakethequeryfaster.Formoretips,see"Optimizing
scripts"onthefacingpage.
Execution:thetimeittakestoexecutethescript.IfyouareanexperiencedJavaScriptcoderyoumay
beabletooptimizethecodetospeeduptheexecutionofthescript.
Page 819