src/eric7/DebugClients/Python/DebugClientBase.py

branch
eric7
changeset 10289
490388ca210c
parent 10065
de4ae767b0e3
child 10321
4a017fdf316f
equal deleted inserted replaced
10288:1f5c7f54c3cc 10289:490388ca210c
196 self.defaultCoding = "utf-8" 196 self.defaultCoding = "utf-8"
197 self.__coding = self.defaultCoding 197 self.__coding = self.defaultCoding
198 self.noencoding = False 198 self.noencoding = False
199 199
200 self.startOptions = None 200 self.startOptions = None
201
202 self.callTraceOptimization = False
201 203
202 def getCoding(self): 204 def getCoding(self):
203 """ 205 """
204 Public method to return the current coding. 206 Public method to return the current coding.
205 207
1839 exceptions=True, 1841 exceptions=True,
1840 tracePython=False, 1842 tracePython=False,
1841 redirect=True, 1843 redirect=True,
1842 passive=True, 1844 passive=True,
1843 multiprocessSupport=False, 1845 multiprocessSupport=False,
1846 callTraceOptimization=False,
1844 codeStr="", 1847 codeStr="",
1845 scriptModule="", 1848 scriptModule="",
1846 ): 1849 ):
1847 """ 1850 """
1848 Public method used to start the remote debugger. 1851 Public method used to start the remote debugger.
1849 1852
1850 @param progargs commandline for the program to be debugged 1853 @param progargs commandline for the program to be debugged
1851 (list of strings) 1854 @type list of str
1852 @param wd working directory for the program execution (string) 1855 @param wd working directory for the program execution
1853 @param host hostname of the debug server (string) 1856 @type str
1854 @param port portnumber of the debug server (int) 1857 @param host hostname of the debug server
1858 @type str
1859 @param port portnumber of the debug server
1860 @type int
1855 @param exceptions flag to enable exception reporting of the IDE 1861 @param exceptions flag to enable exception reporting of the IDE
1856 (boolean) 1862 @type bool
1857 @param tracePython flag to enable tracing into the Python library 1863 @param tracePython flag to enable tracing into the Python library
1858 (boolean) 1864 @type bool
1859 @param redirect flag indicating redirection of stdin, stdout and 1865 @param redirect flag indicating redirection of stdin, stdout and
1860 stderr (boolean) 1866 stderr
1867 @type bool
1861 @param passive flag indicating a passive debugging session 1868 @param passive flag indicating a passive debugging session
1862 @type bool 1869 @type bool
1863 @param multiprocessSupport flag indicating to enable multiprocess 1870 @param multiprocessSupport flag indicating to enable multiprocess
1864 debugging support 1871 debugging support
1872 @type bool
1873 @param callTraceOptimization flag indicating to speed up function/method
1874 call tracing
1865 @type bool 1875 @type bool
1866 @param codeStr string containing Python code to execute 1876 @param codeStr string containing Python code to execute
1867 @type str 1877 @type str
1868 @param scriptModule name of a module to be executed as a script 1878 @param scriptModule name of a module to be executed as a script
1869 @type str 1879 @type str
1902 os.chdir(wd) 1912 os.chdir(wd)
1903 self.running = sys.argv[0] 1913 self.running = sys.argv[0]
1904 self.__setCoding(self.running) 1914 self.__setCoding(self.running)
1905 self.debugging = True 1915 self.debugging = True
1906 self.multiprocessSupport = multiprocessSupport 1916 self.multiprocessSupport = multiprocessSupport
1917 self.callTraceOptimization = callTraceOptimization
1907 1918
1908 self.passive = passive 1919 self.passive = passive
1909 if passive: 1920 if passive:
1910 self.sendPassiveStartup(self.running, exceptions) 1921 self.sendPassiveStartup(self.running, exceptions)
1911 1922
1995 tracePython = False 2006 tracePython = False
1996 exceptions = True 2007 exceptions = True
1997 redirect = True 2008 redirect = True
1998 passive = True 2009 passive = True
1999 multiprocess = False 2010 multiprocess = False
2011 callTraceOptimization = False
2000 codeStr = "" 2012 codeStr = ""
2001 scriptModule = "" 2013 scriptModule = ""
2002 while args[0]: 2014 while args[0]:
2003 if args[0] == "-h": 2015 if args[0] == "-h":
2004 host = args[1] 2016 host = args[1]
2027 elif args[0] == "--no-passive": 2039 elif args[0] == "--no-passive":
2028 passive = False 2040 passive = False
2029 del args[0] 2041 del args[0]
2030 elif args[0] == "--multiprocess": 2042 elif args[0] == "--multiprocess":
2031 multiprocess = True 2043 multiprocess = True
2044 del args[0]
2045 elif args[0] == "--call-trace-optimization":
2046 callTraceOptimization = True
2032 del args[0] 2047 del args[0]
2033 elif args[0] in ("-c", "--code"): 2048 elif args[0] in ("-c", "--code"):
2034 codeStr = args[1] 2049 codeStr = args[1]
2035 del args[0] 2050 del args[0]
2036 del args[0] 2051 del args[0]
2071 exceptions=exceptions, 2086 exceptions=exceptions,
2072 tracePython=tracePython, 2087 tracePython=tracePython,
2073 redirect=redirect, 2088 redirect=redirect,
2074 passive=passive, 2089 passive=passive,
2075 multiprocessSupport=multiprocess, 2090 multiprocessSupport=multiprocess,
2091 callTraceOptimization=callTraceOptimization,
2076 codeStr=codeStr, 2092 codeStr=codeStr,
2077 scriptModule=scriptModule, 2093 scriptModule=scriptModule,
2078 ) 2094 )
2079 sys.exit(res) 2095 sys.exit(res)
2080 else: 2096 else:
2082 self.noencoding = True 2098 self.noencoding = True
2083 del sys.argv[1] 2099 del sys.argv[1]
2084 2100
2085 if sys.argv[1] == "--multiprocess": 2101 if sys.argv[1] == "--multiprocess":
2086 self.multiprocessSupport = True 2102 self.multiprocessSupport = True
2103 del sys.argv[1]
2104
2105 if sys.argv[1] == "--call-trace-optimization":
2106 self.callTraceOptimization = True
2087 del sys.argv[1] 2107 del sys.argv[1]
2088 2108
2089 if sys.argv[1] == "": 2109 if sys.argv[1] == "":
2090 del sys.argv[1] 2110 del sys.argv[1]
2091 2111

eric ide

mercurial