--- a/eric6/DebugClients/Python/DebugClientBase.py Sat May 01 14:27:38 2021 +0200 +++ b/eric6/DebugClients/Python/DebugClientBase.py Thu Jun 03 11:39:23 2021 +0200 @@ -20,7 +20,6 @@ import signal import time import types -import importlib.util import fnmatch import contextlib @@ -870,9 +869,7 @@ os.path.dirname(os.path.abspath(params["filename"])) ) if params["filename"]: - spec = importlib.util.spec_from_file_location( - params["testname"], params["filename"]) - utModule = importlib.util.module_from_spec(spec) + utModule = __import__(params["testname"]) else: utModule = None if params["failed"]: @@ -1514,7 +1511,7 @@ if scope: varDict = self.debugMod.__dict__ else: - scope = -1 + scope = -2 elif scope: varDict = f.f_globals elif f.f_globals is f.f_locals: @@ -1522,7 +1519,7 @@ else: varDict = f.f_locals - varlist = [] if scope == -1 else self.__formatVariablesList( + varlist = [] if scope < 0 else self.__formatVariablesList( varDict, scope, filterList) self.sendJsonCommand("ResponseVariables", {