Public Types | Public Member Functions | Public Attributes

jsdIDebuggerService Interface Reference

Debugger service. More...

import "jsdIDebuggerService.idl";

Collaboration diagram for jsdIDebuggerService:

List of all members.

Public Types

enum  { VERSION_1_0 = 100 }
 

VERSION_* values must be kept in sync with the JSVersion enumeration in jspubtd.h.

More...
enum  { VERSION_1_1 = 110 }
enum  { VERSION_1_2 = 120 }
enum  { VERSION_1_3 = 130 }
enum  { VERSION_1_4 = 140 }
enum  { VERSION_1_5 = 150 }
enum  { VERSION_DEFAULT = 0 }
enum  { VERSION_UNKNOWN = -1 }
enum  { ENABLE_NATIVE_FRAMES = 1U }
 

These flags need to be kept in sync with the context flags defined in jsdebug.h.

More...
enum  { PROFILE_WHEN_SET = 2U }
 

Normally, if a script has a 0 in JSD_SCRIPT_PROFILE_BIT it is included in profile data, otherwise it is not profiled.

More...
enum  { DEBUG_WHEN_SET = 4U }
 

Normally, when the script in the top frame of a thread state has a 1 in JSD_SCRIPT_DEBUG_BIT, the execution hook is ignored.

More...
enum  { COLLECT_PROFILE_DATA = 8U }
 

When this flag is set the internal call hook will collect profile data.

More...
enum  { HIDE_DISABLED_FRAMES = 16U }
 

When this flag is set, stack frames that are disabled for debugging will not appear in the call stack chain.

More...
enum  { MASK_TOP_FRAME_ONLY = 32U }
 

When this flag is set, the debugger will only check the JSD_SCRIPT_DEBUG_BIT on the top (most recent) stack frame.

More...
enum  { DISABLE_OBJECT_TRACE = 64U }
 

When this flag is set, object creation will not be tracked.

More...

Public Member Functions

virtual nsresult GetJSDContext (JSDContext **aJSDContext)=0
 Debugger service.
virtual nsresult GetErrorHook (jsdIErrorHook **aErrorHook)=0
 Called when an error or warning occurs.
virtual nsresult SetErrorHook (jsdIErrorHook *aErrorHook)=0
virtual nsresult GetScriptHook (jsdIScriptHook **aScriptHook)=0
 Called when a jsdIScript is created or destroyed.
virtual nsresult SetScriptHook (jsdIScriptHook *aScriptHook)=0
virtual nsresult GetBreakpointHook (jsdIExecutionHook **aBreakpointHook)=0
 Called when the engine encounters a breakpoint.
virtual nsresult SetBreakpointHook (jsdIExecutionHook *aBreakpointHook)=0
virtual nsresult GetDebuggerHook (jsdIExecutionHook **aDebuggerHook)=0
 Called when the engine encounters the debugger keyword.
virtual nsresult SetDebuggerHook (jsdIExecutionHook *aDebuggerHook)=0
virtual nsresult GetDebugHook (jsdIExecutionHook **aDebugHook)=0
 Called when the errorHook returns false.
virtual nsresult SetDebugHook (jsdIExecutionHook *aDebugHook)=0
virtual nsresult GetInterruptHook (jsdIExecutionHook **aInterruptHook)=0
 Called before the next PC is executed.
virtual nsresult SetInterruptHook (jsdIExecutionHook *aInterruptHook)=0
virtual nsresult GetThrowHook (jsdIExecutionHook **aThrowHook)=0
 Called when an exception is thrown (even if it will be caught.
virtual nsresult SetThrowHook (jsdIExecutionHook *aThrowHook)=0
virtual nsresult GetTopLevelHook (jsdICallHook **aTopLevelHook)=0
 Called before and after a toplevel script is evaluated.
virtual nsresult SetTopLevelHook (jsdICallHook *aTopLevelHook)=0
virtual nsresult GetFunctionHook (jsdICallHook **aFunctionHook)=0
 Called before and after a function is called.
virtual nsresult SetFunctionHook (jsdICallHook *aFunctionHook)=0
virtual nsresult GetFlags (PRUint32 *aFlags)=0
 Debugger service flags.
virtual nsresult SetFlags (PRUint32 aFlags)=0
virtual nsresult GetImplementationMajor (PRUint32 *aImplementationMajor)=0
 Major version number of implementation.
virtual nsresult GetImplementationMinor (PRUint32 *aImplementationMinor)=0
 Minor version number of implementation.
virtual nsresult GetImplementationString (nsACString &aImplementationString)=0
 Free form AUTF8String identifier for implementation.
virtual nsresult GetInitAtStartup (PRBool *aInitAtStartup)=0
 |true| if the debugger should register an app-start observer in order to begin collecting debug information when mozilla is launched.
virtual nsresult SetInitAtStartup (PRBool aInitAtStartup)=0
virtual nsresult GetIsOn (PRBool *aIsOn)=0
 |true| if the debugger service has been turned on.
virtual nsresult On (void)=0
 Turn on the debugger.
virtual nsresult OnForRuntime (JSRuntime *rt)=0
 Turn on the debugger for a given runtime.
virtual nsresult Off (void)=0
 Turn the debugger off.
virtual nsresult GetPauseDepth (PRUint32 *aPauseDepth)=0
 Peek at the current pause depth of the debugger.
virtual nsresult Pause (PRUint32 *_retval)=0
 Temporarily disable the debugger.
virtual nsresult UnPause (PRUint32 *_retval)=0
 Undo a pause.
virtual nsresult GC (void)=0
 Force the engine to perform garbage collection.
virtual nsresult ClearProfileData (void)=0
 Clear profile data for all scripts.
virtual nsresult InsertFilter (jsdIFilter *filter, jsdIFilter *after)=0
 Adds an execution hook filter.
virtual nsresult AppendFilter (jsdIFilter *filter)=0
 Same as insertFilter, except always add to the end of the list.
virtual nsresult RemoveFilter (jsdIFilter *filter)=0
 Remove a filter.
virtual nsresult SwapFilters (jsdIFilter *filter_a, jsdIFilter *filter_b)=0
 Swap position of two filters.
virtual nsresult EnumerateFilters (jsdIFilterEnumerator *enumerator)=0
 Enumerate registered filters.
virtual nsresult RefreshFilters (void)=0
 Force the debugger to resync its internal filter cache with the actual values in the jsdIFilter objects.
virtual nsresult ClearFilters (void)=0
 Clear the list of filters.
virtual nsresult EnumerateContexts (jsdIContextEnumerator *enumerator)=0
 Enumerate all known contexts.
virtual nsresult EnumerateScripts (jsdIScriptEnumerator *enumerator)=0
 Enumerate all scripts the debugger knows about.
virtual nsresult ClearAllBreakpoints (void)=0
 Clear all breakpoints in all scripts.
virtual nsresult WrapValue (jsdIValue **_retval)=0
 When called from JavaScript, this method returns the jsdIValue wrapper for the given value.
virtual nsresult WrapJSValue (jsval value, jsdIValue **_retval)=0
 The same as above but to be called from C++.
virtual nsresult EnterNestedEventLoop (jsdINestCallback *callback, PRUint32 *_retval)=0
 Push a new network queue, and enter a new UI event loop.
virtual nsresult ExitNestedEventLoop (PRUint32 *_retval)=0
 Exit the current nested event loop after the current iteration completes, and pop the network event queue.
virtual nsresult DumpHeap (const nsACString &fileName)=0
 Output dump of JS heap.
void on ()
 Turn on the debugger.
void onForRuntime (in JSRuntime rt)
 Turn on the debugger for a given runtime.
void off ()
 Turn the debugger off.
unsigned long pause ()
 Temporarily disable the debugger.
unsigned long unPause ()
 Undo a pause.
void GC ()
 Force the engine to perform garbage collection.
void clearProfileData ()
 Clear profile data for all scripts.
void insertFilter (in jsdIFilter filter, in jsdIFilter after)
 Adds an execution hook filter.
void appendFilter (in jsdIFilter filter)
 Same as insertFilter, except always add to the end of the list.
void removeFilter (in jsdIFilter filter)
 Remove a filter.
void swapFilters (in jsdIFilter filter_a, in jsdIFilter filter_b)
 Swap position of two filters.
void enumerateFilters (in jsdIFilterEnumerator enumerator)
 Enumerate registered filters.
void refreshFilters ()
 Force the debugger to resync its internal filter cache with the actual values in the jsdIFilter objects.
void clearFilters ()
 Clear the list of filters.
void enumerateContexts (in jsdIContextEnumerator enumerator)
 Enumerate all known contexts.
void enumerateScripts (in jsdIScriptEnumerator enumerator)
 Enumerate all scripts the debugger knows about.
void clearAllBreakpoints ()
 Clear all breakpoints in all scripts.
jsdIValue wrapValue ()
 When called from JavaScript, this method returns the jsdIValue wrapper for the given value.
jsdIValue wrapJSValue (in JSVal value)
 The same as above but to be called from C++.
unsigned long enterNestedEventLoop (in jsdINestCallback callback)
 Push a new network queue, and enter a new UI event loop.
unsigned long exitNestedEventLoop ()
 Exit the current nested event loop after the current iteration completes, and pop the network event queue.
void dumpHeap (in AUTF8String fileName)
 Output dump of JS heap.

Public Attributes

readonly attribute JSDContext JSDContext
 Internal use only.
attribute jsdIErrorHook errorHook
 Called when an error or warning occurs.
attribute jsdIScriptHook scriptHook
 Called when a jsdIScript is created or destroyed.
attribute jsdIExecutionHook breakpointHook
 Called when the engine encounters a breakpoint.
attribute jsdIExecutionHook debuggerHook
 Called when the engine encounters the debugger keyword.
attribute jsdIExecutionHook debugHook
 Called when the errorHook returns false.
attribute jsdIExecutionHook interruptHook
 Called before the next PC is executed.
attribute jsdIExecutionHook throwHook
 Called when an exception is thrown (even if it will be caught.
attribute jsdICallHook topLevelHook
 Called before and after a toplevel script is evaluated.
attribute jsdICallHook functionHook
 Called before and after a function is called.
const long VERSION_1_0 = 100
 VERSION_* values must be kept in sync with the JSVersion enumeration in jspubtd.h.
const long VERSION_1_1 = 110
const long VERSION_1_2 = 120
const long VERSION_1_3 = 130
const long VERSION_1_4 = 140
const long VERSION_1_5 = 150
const long VERSION_DEFAULT = 0
const long VERSION_UNKNOWN = -1
const unsigned long ENABLE_NATIVE_FRAMES = 0x01
 These flags need to be kept in sync with the context flags defined in jsdebug.h.
const unsigned long PROFILE_WHEN_SET = 0x02
 Normally, if a script has a 0 in JSD_SCRIPT_PROFILE_BIT it is included in profile data, otherwise it is not profiled.
const unsigned long DEBUG_WHEN_SET = 0x04
 Normally, when the script in the top frame of a thread state has a 1 in JSD_SCRIPT_DEBUG_BIT, the execution hook is ignored.
const unsigned long COLLECT_PROFILE_DATA = 0x08
 When this flag is set the internal call hook will collect profile data.
const unsigned long HIDE_DISABLED_FRAMES = 0x10
 When this flag is set, stack frames that are disabled for debugging will not appear in the call stack chain.
const unsigned long MASK_TOP_FRAME_ONLY = 0x20
 When this flag is set, the debugger will only check the JSD_SCRIPT_DEBUG_BIT on the top (most recent) stack frame.
const unsigned long DISABLE_OBJECT_TRACE = 0x40
 When this flag is set, object creation will not be tracked.
attribute unsigned long flags
 Debugger service flags.
readonly attribute unsigned long implementationMajor
 Major version number of implementation.
readonly attribute unsigned long implementationMinor
 Minor version number of implementation.
readonly attribute AUTF8String implementationString
 Free form AUTF8String identifier for implementation.
attribute boolean initAtStartup
 |true| if the debugger should register an app-start observer in order to begin collecting debug information when mozilla is launched.
readonly attribute boolean isOn
 |true| if the debugger service has been turned on.
readonly attribute unsigned long pauseDepth
 Peek at the current pause depth of the debugger.

Detailed Description

Debugger service.

It's not a good idea to have more than one active client of the debugger service.


Member Enumeration Documentation

anonymous enum

VERSION_* values must be kept in sync with the JSVersion enumeration in jspubtd.h.

Possible values for jsdIScript::version and jsdIContext::version.

Enumerator:
VERSION_1_0 
anonymous enum
Enumerator:
VERSION_1_1 
anonymous enum
Enumerator:
VERSION_1_2 
anonymous enum
Enumerator:
VERSION_1_3 
anonymous enum
Enumerator:
VERSION_1_4 
anonymous enum
Enumerator:
VERSION_1_5 
anonymous enum
Enumerator:
VERSION_DEFAULT 
anonymous enum
Enumerator:
VERSION_UNKNOWN 
anonymous enum

These flags need to be kept in sync with the context flags defined in jsdebug.h.

Link native frames in call stacks.

Enumerator:
ENABLE_NATIVE_FRAMES 
anonymous enum

Normally, if a script has a 0 in JSD_SCRIPT_PROFILE_BIT it is included in profile data, otherwise it is not profiled.

Setting the PROFILE_WHEN_SET flag reverses this convention.

Enumerator:
PROFILE_WHEN_SET 
anonymous enum

Normally, when the script in the top frame of a thread state has a 1 in JSD_SCRIPT_DEBUG_BIT, the execution hook is ignored.

Setting the DEBUG_WHEN_SET flag reverses this convention.

Enumerator:
DEBUG_WHEN_SET 
anonymous enum

When this flag is set the internal call hook will collect profile data.

Enumerator:
COLLECT_PROFILE_DATA 
anonymous enum

When this flag is set, stack frames that are disabled for debugging will not appear in the call stack chain.

Enumerator:
HIDE_DISABLED_FRAMES 
anonymous enum

When this flag is set, the debugger will only check the JSD_SCRIPT_DEBUG_BIT on the top (most recent) stack frame.

This makes it possible to stop in an enabled frame which was called from a stack that contains a disabled frame.

When this flag is *not* set, any stack that contains a disabled frame will not be debugged (the execution hook will not be invoked.)

This only applies when the reason for calling the hook would have been TYPE_INTERRUPTED or TYPE_THROW. TYPE_BREAKPOINT, TYPE_DEBUG_REQUESTED, and TYPE_DEBUGGER_KEYWORD always stop, regardless of this setting, as long as the top frame is not disabled.

If HIDE_DISABLED_FRAMES is set, this is effectively set as well.

Enumerator:
MASK_TOP_FRAME_ONLY 
anonymous enum

When this flag is set, object creation will not be tracked.

This will reduce the performance price you pay by enabling the debugger.

Enumerator:
DISABLE_OBJECT_TRACE 

Member Function Documentation

virtual nsresult jsdIDebuggerService::AppendFilter ( jsdIFilter filter  )  [pure virtual]

Same as insertFilter, except always add to the end of the list.

void jsdIDebuggerService::appendFilter ( in jsdIFilter  filter  ) 

Same as insertFilter, except always add to the end of the list.

virtual nsresult jsdIDebuggerService::ClearAllBreakpoints ( void   )  [pure virtual]

Clear all breakpoints in all scripts.

void jsdIDebuggerService::clearAllBreakpoints (  ) 

Clear all breakpoints in all scripts.

void jsdIDebuggerService::clearFilters (  ) 

Clear the list of filters.

virtual nsresult jsdIDebuggerService::ClearFilters ( void   )  [pure virtual]

Clear the list of filters.

virtual nsresult jsdIDebuggerService::ClearProfileData ( void   )  [pure virtual]

Clear profile data for all scripts.

void jsdIDebuggerService::clearProfileData (  ) 

Clear profile data for all scripts.

void jsdIDebuggerService::dumpHeap ( in AUTF8String  fileName  ) 

Output dump of JS heap.

Parameters:
fileName Filename to dump the heap into.
virtual nsresult jsdIDebuggerService::DumpHeap ( const nsACString fileName  )  [pure virtual]

Output dump of JS heap.

Parameters:
fileName Filename to dump the heap into.
unsigned long jsdIDebuggerService::enterNestedEventLoop ( in jsdINestCallback  callback  ) 

Push a new network queue, and enter a new UI event loop.

Parameters:
callback jsdINestCallback instance to be called back after the network queue has been pushed, but before the UI loop starts.
Returns:
depth returns the current number of times the event loop has been nested. your code can use it for sanity checks.
virtual nsresult jsdIDebuggerService::EnterNestedEventLoop ( jsdINestCallback callback,
PRUint32 *  _retval 
) [pure virtual]

Push a new network queue, and enter a new UI event loop.

Parameters:
callback jsdINestCallback instance to be called back after the network queue has been pushed, but before the UI loop starts.
Returns:
depth returns the current number of times the event loop has been nested. your code can use it for sanity checks.
void jsdIDebuggerService::enumerateContexts ( in jsdIContextEnumerator  enumerator  ) 

Enumerate all known contexts.

virtual nsresult jsdIDebuggerService::EnumerateContexts ( jsdIContextEnumerator enumerator  )  [pure virtual]

Enumerate all known contexts.

virtual nsresult jsdIDebuggerService::EnumerateFilters ( jsdIFilterEnumerator enumerator  )  [pure virtual]

Enumerate registered filters.

This routine refreshes each filter before passing them on to the enumeration function. Calling this with a null |enumerator| is equivalent to jsdIService::refreshFilters.

Parameters:
enumerator jsdIFilterEnumerator instance to be called back for the enumeration.
void jsdIDebuggerService::enumerateFilters ( in jsdIFilterEnumerator  enumerator  ) 

Enumerate registered filters.

This routine refreshes each filter before passing them on to the enumeration function. Calling this with a null |enumerator| is equivalent to jsdIService::refreshFilters.

Parameters:
enumerator jsdIFilterEnumerator instance to be called back for the enumeration.
void jsdIDebuggerService::enumerateScripts ( in jsdIScriptEnumerator  enumerator  ) 

Enumerate all scripts the debugger knows about.

Any scripts created before you turned the debugger on, or after turning the debugger off will not be available unless the autostart perf is set.

Parameters:
enumerator jsdIScriptEnumerator instance to be called back for the enumeration.
virtual nsresult jsdIDebuggerService::EnumerateScripts ( jsdIScriptEnumerator enumerator  )  [pure virtual]

Enumerate all scripts the debugger knows about.

Any scripts created before you turned the debugger on, or after turning the debugger off will not be available unless the autostart perf is set.

Parameters:
enumerator jsdIScriptEnumerator instance to be called back for the enumeration.
unsigned long jsdIDebuggerService::exitNestedEventLoop (  ) 

Exit the current nested event loop after the current iteration completes, and pop the network event queue.

Returns:
depth returns the current number of times the event loop has been nested. your code can use it for sanity checks.
virtual nsresult jsdIDebuggerService::ExitNestedEventLoop ( PRUint32 *  _retval  )  [pure virtual]

Exit the current nested event loop after the current iteration completes, and pop the network event queue.

Returns:
depth returns the current number of times the event loop has been nested. your code can use it for sanity checks.
virtual nsresult jsdIDebuggerService::GC ( void   )  [pure virtual]

Force the engine to perform garbage collection.

void jsdIDebuggerService::GC (  ) 

Force the engine to perform garbage collection.

virtual nsresult jsdIDebuggerService::GetBreakpointHook ( jsdIExecutionHook **  aBreakpointHook  )  [pure virtual]

Called when the engine encounters a breakpoint.

virtual nsresult jsdIDebuggerService::GetDebuggerHook ( jsdIExecutionHook **  aDebuggerHook  )  [pure virtual]

Called when the engine encounters the debugger keyword.

virtual nsresult jsdIDebuggerService::GetDebugHook ( jsdIExecutionHook **  aDebugHook  )  [pure virtual]

Called when the errorHook returns false.

virtual nsresult jsdIDebuggerService::GetErrorHook ( jsdIErrorHook **  aErrorHook  )  [pure virtual]

Called when an error or warning occurs.

virtual nsresult jsdIDebuggerService::GetFlags ( PRUint32 *  aFlags  )  [pure virtual]

Debugger service flags.

virtual nsresult jsdIDebuggerService::GetFunctionHook ( jsdICallHook **  aFunctionHook  )  [pure virtual]

Called before and after a function is called.

virtual nsresult jsdIDebuggerService::GetImplementationMajor ( PRUint32 *  aImplementationMajor  )  [pure virtual]

Major version number of implementation.

virtual nsresult jsdIDebuggerService::GetImplementationMinor ( PRUint32 *  aImplementationMinor  )  [pure virtual]

Minor version number of implementation.

virtual nsresult jsdIDebuggerService::GetImplementationString ( nsACString aImplementationString  )  [pure virtual]

Free form AUTF8String identifier for implementation.

virtual nsresult jsdIDebuggerService::GetInitAtStartup ( PRBool aInitAtStartup  )  [pure virtual]

|true| if the debugger should register an app-start observer in order to begin collecting debug information when mozilla is launched.

virtual nsresult jsdIDebuggerService::GetInterruptHook ( jsdIExecutionHook **  aInterruptHook  )  [pure virtual]

Called before the next PC is executed.

virtual nsresult jsdIDebuggerService::GetIsOn ( PRBool aIsOn  )  [pure virtual]

|true| if the debugger service has been turned on.

This does not necessarily mean another app is actively using the service, as the autostart pref may have turned the service on.

virtual nsresult jsdIDebuggerService::GetJSDContext ( JSDContext **  aJSDContext  )  [pure virtual]

Debugger service.

It's not a good idea to have more than one active client of the debugger service. Internal use only.

virtual nsresult jsdIDebuggerService::GetPauseDepth ( PRUint32 *  aPauseDepth  )  [pure virtual]

Peek at the current pause depth of the debugger.

Returns:
depth Number of pause() calls still waiting to be unPause()d.
virtual nsresult jsdIDebuggerService::GetScriptHook ( jsdIScriptHook **  aScriptHook  )  [pure virtual]

Called when a jsdIScript is created or destroyed.

virtual nsresult jsdIDebuggerService::GetThrowHook ( jsdIExecutionHook **  aThrowHook  )  [pure virtual]

Called when an exception is thrown (even if it will be caught.

)

virtual nsresult jsdIDebuggerService::GetTopLevelHook ( jsdICallHook **  aTopLevelHook  )  [pure virtual]

Called before and after a toplevel script is evaluated.

virtual nsresult jsdIDebuggerService::InsertFilter ( jsdIFilter filter,
jsdIFilter after 
) [pure virtual]

Adds an execution hook filter.

These filters are consulted each time one of the jsdIExecutionHooks is about to be called. Filters are matched in a first in, first compared fashion. The first filter to match determines whether or not the hook is called. Use swapFilter to reorder existing filters, and removeFilter to remove them.

If |filter| is already present this method throws NS_ERROR_INVALID_ARG.

Parameters:
filter Object representing the filter to add.
after Insert |filter| after this one. Pass null to insert at the beginning.
void jsdIDebuggerService::insertFilter ( in jsdIFilter  filter,
in jsdIFilter  after 
)

Adds an execution hook filter.

These filters are consulted each time one of the jsdIExecutionHooks is about to be called. Filters are matched in a first in, first compared fashion. The first filter to match determines whether or not the hook is called. Use swapFilter to reorder existing filters, and removeFilter to remove them.

If |filter| is already present this method throws NS_ERROR_INVALID_ARG.

Parameters:
filter Object representing the filter to add.
after Insert |filter| after this one. Pass null to insert at the beginning.
void jsdIDebuggerService::off (  ) 

Turn the debugger off.

This will invalidate all of your jsdIEphemeral derived objects, and clear all of your breakpoints. In theory you should be able to turn the debugger back on at some later time without any problems.

virtual nsresult jsdIDebuggerService::Off ( void   )  [pure virtual]

Turn the debugger off.

This will invalidate all of your jsdIEphemeral derived objects, and clear all of your breakpoints. In theory you should be able to turn the debugger back on at some later time without any problems.

void jsdIDebuggerService::on (  ) 

Turn on the debugger.

This function should only be called from JavaScript code. The debugger will be enabled on the runtime the call is made on, as determined by nsIXPCNativeCallContext.

virtual nsresult jsdIDebuggerService::On ( void   )  [pure virtual]

Turn on the debugger.

This function should only be called from JavaScript code. The debugger will be enabled on the runtime the call is made on, as determined by nsIXPCNativeCallContext.

void jsdIDebuggerService::onForRuntime ( in JSRuntime  rt  ) 

Turn on the debugger for a given runtime.

Parameters:
rt The runtime you want to debug. You cannot turn the debugger on for multiple runtimes.
virtual nsresult jsdIDebuggerService::OnForRuntime ( JSRuntime rt  )  [pure virtual]

Turn on the debugger for a given runtime.

Parameters:
rt The runtime you want to debug. You cannot turn the debugger on for multiple runtimes.
virtual nsresult jsdIDebuggerService::Pause ( PRUint32 *  _retval  )  [pure virtual]

Temporarily disable the debugger.

Hooks will not be called while the debugger is paused. Multiple calls to pause will increase the "pause depth", and equal number of unPause calles must be made to resume normal debugging.

Returns:
depth Number of times pause has been called since the debugger has been unpaused.
unsigned long jsdIDebuggerService::pause (  ) 

Temporarily disable the debugger.

Hooks will not be called while the debugger is paused. Multiple calls to pause will increase the "pause depth", and equal number of unPause calles must be made to resume normal debugging.

Returns:
depth Number of times pause has been called since the debugger has been unpaused.
void jsdIDebuggerService::refreshFilters (  ) 

Force the debugger to resync its internal filter cache with the actual values in the jsdIFilter objects.

To refresh a single filter use jsdIService::swapFilters. This method is equivalent to jsdIService::enumerateFilters with a null enumerator.

virtual nsresult jsdIDebuggerService::RefreshFilters ( void   )  [pure virtual]

Force the debugger to resync its internal filter cache with the actual values in the jsdIFilter objects.

To refresh a single filter use jsdIService::swapFilters. This method is equivalent to jsdIService::enumerateFilters with a null enumerator.

virtual nsresult jsdIDebuggerService::RemoveFilter ( jsdIFilter filter  )  [pure virtual]

Remove a filter.

If |filter| is not present this method throws NS_ERROR_INVALID_ARG.

Parameters:
filter Object representing the filter to remove. Must be the exact object passed to addFilter, not just a new object with the same properties.
void jsdIDebuggerService::removeFilter ( in jsdIFilter  filter  ) 

Remove a filter.

If |filter| is not present this method throws NS_ERROR_INVALID_ARG.

Parameters:
filter Object representing the filter to remove. Must be the exact object passed to addFilter, not just a new object with the same properties.
virtual nsresult jsdIDebuggerService::SetBreakpointHook ( jsdIExecutionHook aBreakpointHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetDebuggerHook ( jsdIExecutionHook aDebuggerHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetDebugHook ( jsdIExecutionHook aDebugHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetErrorHook ( jsdIErrorHook aErrorHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetFlags ( PRUint32  aFlags  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetFunctionHook ( jsdICallHook aFunctionHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetInitAtStartup ( PRBool  aInitAtStartup  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetInterruptHook ( jsdIExecutionHook aInterruptHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetScriptHook ( jsdIScriptHook aScriptHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetThrowHook ( jsdIExecutionHook aThrowHook  )  [pure virtual]
virtual nsresult jsdIDebuggerService::SetTopLevelHook ( jsdICallHook aTopLevelHook  )  [pure virtual]
void jsdIDebuggerService::swapFilters ( in jsdIFilter  filter_a,
in jsdIFilter  filter_b 
)

Swap position of two filters.

If |filter_a| is not present, this method throws NS_ERROR_INVALID_ARG. If |filter_b| is not present, filter_a is replaced by filter_b. If |filter_a| == |filter_b|, then filter is refreshed.

virtual nsresult jsdIDebuggerService::SwapFilters ( jsdIFilter filter_a,
jsdIFilter filter_b 
) [pure virtual]

Swap position of two filters.

If |filter_a| is not present, this method throws NS_ERROR_INVALID_ARG. If |filter_b| is not present, filter_a is replaced by filter_b. If |filter_a| == |filter_b|, then filter is refreshed.

unsigned long jsdIDebuggerService::unPause (  ) 

Undo a pause.

Returns:
depth The number of remaining pending pause calls.
virtual nsresult jsdIDebuggerService::UnPause ( PRUint32 *  _retval  )  [pure virtual]

Undo a pause.

Returns:
depth The number of remaining pending pause calls.
virtual nsresult jsdIDebuggerService::WrapJSValue ( jsval  value,
jsdIValue **  _retval 
) [pure virtual]

The same as above but to be called from C++.

jsdIValue jsdIDebuggerService::wrapJSValue ( in JSVal  value  ) 

The same as above but to be called from C++.

jsdIValue jsdIDebuggerService::wrapValue (  ) 

When called from JavaScript, this method returns the jsdIValue wrapper for the given value.

If a wrapper does not exist one will be created. When called from another language this method returns an xpconnect defined error code.

virtual nsresult jsdIDebuggerService::WrapValue ( jsdIValue **  _retval  )  [pure virtual]

When called from JavaScript, this method returns the jsdIValue wrapper for the given value.

If a wrapper does not exist one will be created. When called from another language this method returns an xpconnect defined error code.


Member Data Documentation

Called when the engine encounters a breakpoint.

const unsigned long jsdIDebuggerService::COLLECT_PROFILE_DATA = 0x08

When this flag is set the internal call hook will collect profile data.

const unsigned long jsdIDebuggerService::DEBUG_WHEN_SET = 0x04

Normally, when the script in the top frame of a thread state has a 1 in JSD_SCRIPT_DEBUG_BIT, the execution hook is ignored.

Setting the DEBUG_WHEN_SET flag reverses this convention.

Called when the engine encounters the debugger keyword.

Called when the errorHook returns false.

const unsigned long jsdIDebuggerService::DISABLE_OBJECT_TRACE = 0x40

When this flag is set, object creation will not be tracked.

This will reduce the performance price you pay by enabling the debugger.

const unsigned long jsdIDebuggerService::ENABLE_NATIVE_FRAMES = 0x01

These flags need to be kept in sync with the context flags defined in jsdebug.h.

Link native frames in call stacks.

Called when an error or warning occurs.

attribute unsigned long jsdIDebuggerService::flags

Debugger service flags.

Called before and after a function is called.

const unsigned long jsdIDebuggerService::HIDE_DISABLED_FRAMES = 0x10

When this flag is set, stack frames that are disabled for debugging will not appear in the call stack chain.

readonly attribute unsigned long jsdIDebuggerService::implementationMajor

Major version number of implementation.

readonly attribute unsigned long jsdIDebuggerService::implementationMinor

Minor version number of implementation.

readonly attribute AUTF8String jsdIDebuggerService::implementationString

Free form AUTF8String identifier for implementation.

|true| if the debugger should register an app-start observer in order to begin collecting debug information when mozilla is launched.

Called before the next PC is executed.

readonly attribute boolean jsdIDebuggerService::isOn

|true| if the debugger service has been turned on.

This does not necessarily mean another app is actively using the service, as the autostart pref may have turned the service on.

Internal use only.

const unsigned long jsdIDebuggerService::MASK_TOP_FRAME_ONLY = 0x20

When this flag is set, the debugger will only check the JSD_SCRIPT_DEBUG_BIT on the top (most recent) stack frame.

This makes it possible to stop in an enabled frame which was called from a stack that contains a disabled frame.

When this flag is *not* set, any stack that contains a disabled frame will not be debugged (the execution hook will not be invoked.)

This only applies when the reason for calling the hook would have been TYPE_INTERRUPTED or TYPE_THROW. TYPE_BREAKPOINT, TYPE_DEBUG_REQUESTED, and TYPE_DEBUGGER_KEYWORD always stop, regardless of this setting, as long as the top frame is not disabled.

If HIDE_DISABLED_FRAMES is set, this is effectively set as well.

readonly attribute unsigned long jsdIDebuggerService::pauseDepth

Peek at the current pause depth of the debugger.

Returns:
depth Number of pause() calls still waiting to be unPause()d.
const unsigned long jsdIDebuggerService::PROFILE_WHEN_SET = 0x02

Normally, if a script has a 0 in JSD_SCRIPT_PROFILE_BIT it is included in profile data, otherwise it is not profiled.

Setting the PROFILE_WHEN_SET flag reverses this convention.

Called when a jsdIScript is created or destroyed.

Called when an exception is thrown (even if it will be caught.

)

Called before and after a toplevel script is evaluated.

const long jsdIDebuggerService::VERSION_1_0 = 100

VERSION_* values must be kept in sync with the JSVersion enumeration in jspubtd.h.

Possible values for jsdIScript::version and jsdIContext::version.

const long jsdIDebuggerService::VERSION_1_1 = 110
const long jsdIDebuggerService::VERSION_1_2 = 120
const long jsdIDebuggerService::VERSION_1_3 = 130
const long jsdIDebuggerService::VERSION_1_4 = 140
const long jsdIDebuggerService::VERSION_1_5 = 150
const long jsdIDebuggerService::VERSION_DEFAULT = 0
const long jsdIDebuggerService::VERSION_UNKNOWN = -1

The documentation for this interface was generated from the following files: