package cpp.vmAvailable on cpp
This class wraps the hxcpp C++ implementation to provide a Haxe interface to the low level debugging features
static NONEXISTENT_VALUE:String = new String("NONEXISTENT_VALUE")
static inline read only THREAD_CREATED:Int = 1
static THREAD_NOT_STOPPED:String = new String("THREAD_NOT_STOPPED")
static inline read only THREAD_STARTED:Int = 3
static inline read only THREAD_STOPPED:Int = 4
static inline read only THREAD_TERMINATED:Int = 2
static addClassFunctionBreakpoint (className:String, functionName:String):Int
Adds a new class:function breakpoint. The breakpoint number of the newly added breakpoint is returned.
static addFileLineBreakpoint (file:String, line:Int):Int
Adds a new file:line breakpoint. The breakpoint number of the newly added breakpoint is returned.
Breaks all threads except the debugger thread (which should be the same as the calling thread!).
wait is true, waits up to 2 seconds for all threads to be broken. Threads which are in blocking system calls and cannot break after 2 seconds remain running when this function returns.
static continueThreads (specialThreadNumber:Int, continueCount:Int):Void
Continue execution of all stopped threads. If specialThreadNumber is a valid thread number, then it will be continued past
continueCount breakpoints instead of just 1 like all of the other threads.
static deleteBreakpoint (number:Null<Int>):Void
Deletes a breakpoint, or all breakpoints.
static enableCurrentThreadDebugging (enabled:Bool):Void
This can be called to turn off (and then back on) all stopping of debugged threads temporarily. It should only be used by classes that actually implement the debugger to hide themselves from the debugger as necessary.
static getClasses ():Array<String>
Returns the set of class names of all classes known to the debugger. This is a copy of the original array and could be quite large. The caller should cache this value to avoid multiple copies needing to be made.
static getCurrentThreadNumber ():Int
Returns the thread number of the calling thread.
Returns the set of source files known to the debugger. This is a copy of the original array and could be quite large. The caller should cache this value to avoid multiple copies needing to be made.
static getFilesFullPath ():Array<String>
Returns the full paths of the set of source files known to the debugger. This is a copy of the original array and could be quite large. It is possible that this set will be empty, in which case the full paths are not known. The index of these files matches the index from "getFiles", so the full path for a given short path can be calculated.
static getStackVariableValue (threadNumber:Int, stackFrameNumber:Int, name:String, unsafe:Bool):Dynamic
Returns the value of a stack variable, or NONEXISTENT_VALUE if the requested value does not exist. If the thread is actively running and unsafe is not true, returns THREAD_NOT_STOPPED.
Returns the list of local variables (including "this", function arguments, and local variables) visible to the given thread at the given stack frame.
Returns a list with a single entry, THREAD_NOT_STOPPED, if the thread is not stopped and thus variables cannot be fetched and unsafe is not true.
static getThreadInfo (threadNumber:Int, unsafe:Bool):ThreadInfo
Returns a ThreadInfo object describing a single thread, or null if there is no such thread or the thread queried about was the debugger thread and unsafe was not true.
static getThreadInfos ():Array<ThreadInfo>
Returns a ThreadInfo object describing every thread that existed at the moment that the call was made, except for the debugger thread.
static setEventNotificationHandler (handler:Int ‑> Int ‑> Int ‑> String ‑> String ‑> String ‑> Int ‑> Void):Void
Sets the handler callback to be made when asynchronous events occur, specifically, when threads are created, terminated, started, or stopped. The calling thread becomes the "debugger" thread, which means that it will be discluded from any breakpoints and will not be reported on by any thread reporting requests.
Be aware that this callback is made asynchronously and possibly by multiple threads simultaneously.
Setting this to null prevents further callbacks.
Throws a string exception if the program does not support debugging because it was not compiled with the HXCPP_DEBUGGER flag set.
is a function that will be called back by asynchronous thread events. Note that this function is called directly from the thread experiencing the event and the handler should return quickly to avoid blocking the calling thread unnecessarily. The paramaters to handler are: - threadNumber, the thread number of the event - event, one of THREAD_CREATED, THREAD_TERMINATED,
static setStackVariableValue (threadNumber:Int, stackFrameNumber:Int, name:String, value:Dynamic, unsafe:Bool):Dynamic
Sets the value of a stack variable and returns that value. If the variable does not exist, on the stack, this function returns NONEXISTENT_VALUE. If the thread is actively running and unsafe is not true, returns THREAD_NOT_STOPPED, and the value is not set.
static stepThread (threadNumber:Int, stepType:Int, stepCount:Int = 1):Void
Single steps the given thread.
© 2005–2016 Haxe Foundation
Licensed under a MIT license.