eric6/Debugger/DebugServer.py

changeset 8075
6774034a1e0f
parent 7986
2971d5d19951
child 8077
1fd8f611f26a
equal deleted inserted replaced
8074:a54194132814 8075:6774034a1e0f
6 """ 6 """
7 Module implementing the debug server. 7 Module implementing the debug server.
8 """ 8 """
9 9
10 import os 10 import os
11 import shlex
11 12
12 from PyQt5.QtCore import pyqtSignal, pyqtSlot, QModelIndex 13 from PyQt5.QtCore import pyqtSignal, pyqtSlot, QModelIndex
13 from PyQt5.QtNetwork import ( 14 from PyQt5.QtNetwork import (
14 QTcpServer, QHostAddress, QHostInfo, QNetworkInterface 15 QTcpServer, QHostAddress, QHostInfo, QNetworkInterface
15 ) 16 )
20 from .BreakPointModel import BreakPointModel 21 from .BreakPointModel import BreakPointModel
21 from .WatchPointModel import WatchPointModel 22 from .WatchPointModel import WatchPointModel
22 from . import DebugClientCapabilities 23 from . import DebugClientCapabilities
23 24
24 import Preferences 25 import Preferences
25 import Utilities
26 26
27 27
28 DebuggerInterfaces = { 28 DebuggerInterfaces = {
29 "Python": "DebuggerInterfacePython", 29 "Python": "DebuggerInterfacePython",
30 "None": "DebuggerInterfaceNone", 30 "None": "DebuggerInterfaceNone",
908 Public method to set the environment for a program to debug, run, ... 908 Public method to set the environment for a program to debug, run, ...
909 909
910 @param env environment settings 910 @param env environment settings
911 @type str 911 @type str
912 """ 912 """
913 envlist = Utilities.parseEnvironmentString(env) 913 envlist = shlex.split(env)
914 envdict = {} 914 envdict = {}
915 for el in envlist: 915 for el in envlist:
916 try: 916 if '=' in el:
917 key, value = el.split('=', 1) 917 key, value = el.split('=', 1)
918 if value.startswith('"') or value.startswith("'"):
919 value = value[1:-1]
920 envdict[key] = value 918 envdict[key] = value
921 except ValueError: 919 else:
922 pass 920 envdict[el] = ""
923 self.debuggerInterface.remoteEnvironment(envdict) 921 self.debuggerInterface.remoteEnvironment(envdict)
924 922
925 def remoteLoad(self, venvName, fn, argv, wd, env, autoClearShell=True, 923 def remoteLoad(self, venvName, fn, argv, wd, env, autoClearShell=True,
926 tracePython=False, autoContinue=True, forProject=False, 924 tracePython=False, autoContinue=True, forProject=False,
927 runInConsole=False, clientType="", enableCallTrace=False, 925 runInConsole=False, clientType="", enableCallTrace=False,

eric ide

mercurial