--- a/src/eric7/DebugClients/Python/eric7dbgstub.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/DebugClients/Python/eric7dbgstub.py Wed Jul 13 14:55:47 2022 +0200 @@ -16,17 +16,17 @@ debugger = None __scriptname = None -modDir = sysconfig.get_path('platlib') -ericpath = os.getenv('ERICDIR', getConfig('ericDir')) +modDir = sysconfig.get_path("platlib") +ericpath = os.getenv("ERICDIR", getConfig("ericDir")) if ericpath not in sys.path: sys.path.insert(-1, ericpath) - + def initDebugger(kind="standard"): """ Module function to initialize a debugger for remote debugging. - + @param kind type of debugger ("standard" or "threads") @return flag indicating success (boolean) @exception ValueError raised to indicate a wrong debugger kind @@ -36,43 +36,43 @@ try: if kind == "standard": import DebugClient + debugger = DebugClient.DebugClient() else: raise ValueError except ImportError: debugger = None res = False - + return res def runcall(func, *args): """ Module function mimicing the Pdb interface. - + @param func function to be called (function object) @param *args arguments being passed to func @return the function result """ global debugger, __scriptname return debugger.run_call(__scriptname, func, *args) - + def setScriptname(name): """ Module function to set the scriptname to be reported back to the IDE. - + @param name absolute pathname of the script (string) """ global __scriptname __scriptname = name -def startDebugger(enableTrace=True, exceptions=True, - tracePython=False, redirect=True): +def startDebugger(enableTrace=True, exceptions=True, tracePython=False, redirect=True): """ Module function used to start the remote debugger. - + @param enableTrace flag to enable the tracing function (boolean) @param exceptions flag to enable exception reporting of the IDE (boolean) @@ -83,5 +83,9 @@ """ global debugger if debugger: - debugger.startDebugger(enableTrace=enableTrace, exceptions=exceptions, - tracePython=tracePython, redirect=redirect) + debugger.startDebugger( + enableTrace=enableTrace, + exceptions=exceptions, + tracePython=tracePython, + redirect=redirect, + )