railo.runtime.debug
Class DebuggerImpl

java.lang.Object
  extended by railo.runtime.debug.DebuggerImpl
All Implemented Interfaces:
Debugger, DebuggerPro

public final class DebuggerImpl
extends Object
implements DebuggerPro

Class to debug the application


Constructor Summary
DebuggerImpl()
           
 
Method Summary
 void addException(Config config, PageException pe)
           
 void addImplicitAccess(String scope, String name)
           
 void addQuery(Query query, String datasource, String name, SQL sql, int recordcount, PageSource src, int time)
          add new query execution time
 void addQuery(Query query, String datasource, String name, SQL sql, int recordcount, PageSource src, long time)
          add new query execution time
 DebugTimer addTimer(String label, long time, String template)
          adds ne Timer info to debug
 DebugTrace addTrace(int type, String category, String text, PageSource page, String varName, String varValue)
          add new Trace to debug
 DebugTrace addTrace(int type, String category, String text, String template, int line, String action, String varName, String varValue)
           
static boolean debugQueryUsage(PageContext pageContext, Query query)
           
 Struct getDebuggingData(PageContext pc)
          returns the Debugging Info
 Struct getDebuggingData(PageContext pc, boolean addAddionalInfo)
           
 DebugEntryTemplate getEntry(PageContext pc, PageSource source)
           
 DebugEntryTemplatePart getEntry(PageContext pc, PageSource source, int startPos, int endPos)
          returns a single DebugEntry for a specific postion (startPos,endPos in the PageSource)
 DebugEntryTemplate getEntry(PageContext pc, PageSource source, String key)
           
 CatchBlock[] getExceptions()
           
 ImplicitAccess[] getImplicitAccesses(int scope, String name)
           
 Query getOutputText()
           
 DebugTextFragment[] getOutputTextFragments()
           
 List<QueryEntry> getQueries()
           
 DebugTrace[] getTraces()
           
 DebugTrace[] getTraces(PageContext pc)
           
 void init(Config config)
           
 void reset()
          reset the debug object
 void setOutput(boolean output)
          sets if toHTML print html output info or not
 void setOutputLog(DebugOutputLog outputLog)
           
 void writeOut(PageContext pc)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebuggerImpl

public DebuggerImpl()
Method Detail

reset

public void reset()
Description copied from interface: Debugger
reset the debug object

Specified by:
reset in interface Debugger

getEntry

public DebugEntryTemplate getEntry(PageContext pc,
                                   PageSource source)
Specified by:
getEntry in interface Debugger
Parameters:
pc - current PagContext
source - Page Source for the entry
Returns:
returns a single DebugEntry

getEntry

public DebugEntryTemplate getEntry(PageContext pc,
                                   PageSource source,
                                   String key)
Specified by:
getEntry in interface Debugger
Parameters:
pc - current PagContext
source - Page Source for the entry
Returns:
returns a single DebugEntry with a key

getEntry

public DebugEntryTemplatePart getEntry(PageContext pc,
                                       PageSource source,
                                       int startPos,
                                       int endPos)
Description copied from interface: Debugger
returns a single DebugEntry for a specific postion (startPos,endPos in the PageSource)

Specified by:
getEntry in interface Debugger
Parameters:
pc - current PagContext
source - Page Source for the entry
startPos - start position in the file
endPos - end position in the file
Returns:

addQuery

public void addQuery(Query query,
                     String datasource,
                     String name,
                     SQL sql,
                     int recordcount,
                     PageSource src,
                     int time)
Description copied from interface: DebuggerPro
add new query execution time

Specified by:
addQuery in interface Debugger
Specified by:
addQuery in interface DebuggerPro

addQuery

public void addQuery(Query query,
                     String datasource,
                     String name,
                     SQL sql,
                     int recordcount,
                     PageSource src,
                     long time)
Description copied from interface: DebuggerPro
add new query execution time

Specified by:
addQuery in interface DebuggerPro

setOutput

public void setOutput(boolean output)
Description copied from interface: Debugger
sets if toHTML print html output info or not

Specified by:
setOutput in interface Debugger
Parameters:
output - The output to set.

getQueries

public List<QueryEntry> getQueries()
Specified by:
getQueries in interface Debugger
Returns:
Returns the queries.

writeOut

public void writeOut(PageContext pc)
              throws IOException
Specified by:
writeOut in interface Debugger
Throws:
IOException

getDebuggingData

public Struct getDebuggingData(PageContext pc)
                        throws DatabaseException
Description copied from interface: Debugger
returns the Debugging Info

Specified by:
getDebuggingData in interface Debugger
Returns:
debugging Info
Throws:
DatabaseException

getDebuggingData

public Struct getDebuggingData(PageContext pc,
                               boolean addAddionalInfo)
                        throws DatabaseException
Specified by:
getDebuggingData in interface Debugger
Throws:
DatabaseException

addTimer

public DebugTimer addTimer(String label,
                           long time,
                           String template)
Description copied from interface: Debugger
adds ne Timer info to debug

Specified by:
addTimer in interface Debugger

addTrace

public DebugTrace addTrace(int type,
                           String category,
                           String text,
                           PageSource page,
                           String varName,
                           String varValue)
Description copied from interface: Debugger
add new Trace to debug

Specified by:
addTrace in interface Debugger
Returns:
debug trace object

addTrace

public DebugTrace addTrace(int type,
                           String category,
                           String text,
                           String template,
                           int line,
                           String action,
                           String varName,
                           String varValue)
Specified by:
addTrace in interface Debugger

getTraces

public DebugTrace[] getTraces()
Specified by:
getTraces in interface Debugger

getTraces

public DebugTrace[] getTraces(PageContext pc)
Specified by:
getTraces in interface DebuggerPro

addException

public void addException(Config config,
                         PageException pe)
Specified by:
addException in interface Debugger

getExceptions

public CatchBlock[] getExceptions()
Specified by:
getExceptions in interface Debugger

debugQueryUsage

public static boolean debugQueryUsage(PageContext pageContext,
                                      Query query)

init

public void init(Config config)

addImplicitAccess

public void addImplicitAccess(String scope,
                              String name)
Specified by:
addImplicitAccess in interface Debugger

getImplicitAccesses

public ImplicitAccess[] getImplicitAccesses(int scope,
                                            String name)
Specified by:
getImplicitAccesses in interface Debugger

setOutputLog

public void setOutputLog(DebugOutputLog outputLog)

getOutputTextFragments

public DebugTextFragment[] getOutputTextFragments()

getOutputText

public Query getOutputText()
                    throws DatabaseException
Throws:
DatabaseException


Copyright © 2012 Railo