eric6.DebugClients.Python.ThreadExtension

Module implementing an import hook patching thread modules to get debugged too.

Global Attributes

None

Classes

QThreadWrapper
ThreadExtension Class implementing the thread support for the debugger.

Functions

None


QThreadWrapper

Derived from

module.QThread

Class Attributes

__qtThreadNumber

Class Methods

None

Methods

QThreadWrapper
__bootstrapQThread

Static Methods

None

QThreadWrapper (Constructor)

QThreadWrapper(*args, **kwargs)

QThreadWrapper.__bootstrapQThread

__bootstrapQThread()
Up


ThreadExtension

Class implementing the thread support for the debugger.

Provides methods for intercepting thread creation, retriving the running threads and their name and state.

Derived from

object

Class Attributes

None

Class Methods

None

Methods

ThreadExtension Constructor
attachThread Public method to setup a standard thread for DebugClient to debug.
dumpThreadList Public method to send the list of threads.
find_module Public method returning the module loader.
getExecutedFrame Public method to return the currently executed frame.
load_module Public method to load a module.
lockClient Public method to acquire the lock for this client.
setCurrentThread Public method to set the current thread.
threadTerminated Public method called when a DebugThread has exited.
unlockClient Public method to release the lock for this client.
updateThreadList Public method to update the list of running threads.

Static Methods

None

ThreadExtension (Constructor)

ThreadExtension()

Constructor

ThreadExtension.attachThread

attachThread(target=None, args=None, kwargs={}, mainThread=False)

Public method to setup a standard thread for DebugClient to debug.

If mainThread is True, then we are attaching to the already started mainthread of the app and the rest of the args are ignored.

target
the start function of the target thread (i.e. the user code)
args
arguments to pass to target
kwargs
keyword arguments to pass to target
mainThread
True, if we are attaching to the already started mainthread of the app
Returns:
identifier of the created thread

ThreadExtension.dumpThreadList

dumpThreadList()

Public method to send the list of threads.

ThreadExtension.find_module

find_module(fullname, path=None)

Public method returning the module loader.

fullname (str)
name of the module to be loaded
path (str)
path to resolve the module name
Returns:
module loader object
Return Type:
object

ThreadExtension.getExecutedFrame

getExecutedFrame(frame)

Public method to return the currently executed frame.

frame (frame object)
the current frame
Returns:
the frame which is excecuted (without debugger frames)
Return Type:
frame object

ThreadExtension.load_module

load_module(fullname)

Public method to load a module.

fullname (str)
name of the module to be loaded
Returns:
reference to the loaded module
Return Type:
module

ThreadExtension.lockClient

lockClient(blocking=True)

Public method to acquire the lock for this client.

blocking (bool)
flag to indicating a blocking lock
Returns:
flag indicating successful locking
Return Type:
bool

ThreadExtension.setCurrentThread

setCurrentThread(id)

Public method to set the current thread.

id (int)
the id the current thread should be set to.

ThreadExtension.threadTerminated

threadTerminated(threadId)

Public method called when a DebugThread has exited.

threadId (int)
id of the DebugThread that has exited

ThreadExtension.unlockClient

unlockClient()

Public method to release the lock for this client.

ThreadExtension.updateThreadList

updateThreadList()

Public method to update the list of running threads.

Up