Debugger/StartDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2988
f53c03574697
child 3058
0a02c433f52d
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
26 It implements a dialog that is used to start an 26 It implements a dialog that is used to start an
27 application for debugging. It asks the user to enter 27 application for debugging. It asks the user to enter
28 the commandline parameters, the working directory and 28 the commandline parameters, the working directory and
29 whether exception reporting should be disabled. 29 whether exception reporting should be disabled.
30 """ 30 """
31 def __init__(self, caption, argvList, wdList, envList, exceptions, parent=None, 31 def __init__(self, caption, argvList, wdList, envList, exceptions,
32 type=0, modfuncList=None, tracePython=False, autoClearShell=True, 32 parent=None, type=0, modfuncList=None, tracePython=False,
33 autoContinue=True, autoFork=False, forkChild=False): 33 autoClearShell=True, autoContinue=True, autoFork=False,
34 forkChild=False):
34 """ 35 """
35 Constructor 36 Constructor
36 37
37 @param caption the caption to be displayed (string) 38 @param caption the caption to be displayed (string)
38 @param argvList history list of commandline arguments (list of strings) 39 @param argvList history list of commandline arguments (list of strings)
45 <li>0 = start debug dialog</li> 46 <li>0 = start debug dialog</li>
46 <li>1 = start run dialog</li> 47 <li>1 = start run dialog</li>
47 <li>2 = start coverage dialog</li> 48 <li>2 = start coverage dialog</li>
48 <li>3 = start profile dialog</li> 49 <li>3 = start profile dialog</li>
49 </ul> 50 </ul>
50 @keyparam modfuncList history list of module functions (list of strings) 51 @keyparam modfuncList history list of module functions
52 (list of strings)
51 @keyparam tracePython flag indicating if the Python library should 53 @keyparam tracePython flag indicating if the Python library should
52 be traced as well (boolean) 54 be traced as well (boolean)
53 @keyparam autoClearShell flag indicating, that the interpreter window should 55 @keyparam autoClearShell flag indicating, that the interpreter window
54 be cleared automatically (boolean) 56 should be cleared automatically (boolean)
55 @keyparam autoContinue flag indicating, that the debugger should not stop at 57 @keyparam autoContinue flag indicating, that the debugger should not
56 the first executable line (boolean) 58 stop at the first executable line (boolean)
57 @keyparam autoFork flag indicating the automatic fork mode (boolean) 59 @keyparam autoFork flag indicating the automatic fork mode (boolean)
58 @keyparam forkChild flag indicating to debug the child after forking (boolean) 60 @keyparam forkChild flag indicating to debug the child after forking
61 (boolean)
59 """ 62 """
60 super(StartDialog, self).__init__(parent) 63 super(StartDialog, self).__init__(parent)
61 self.setModal(True) 64 self.setModal(True)
62 65
63 self.type = type 66 self.type = type
137 140
138 def getData(self): 141 def getData(self):
139 """ 142 """
140 Public method to retrieve the data entered into this dialog. 143 Public method to retrieve the data entered into this dialog.
141 144
142 @return a tuple of argv (string), workdir (string), environment (string), 145 @return a tuple of argv (string), workdir (string), environment
143 exceptions flag (boolean), clear interpreter flag (boolean), 146 (string), exceptions flag (boolean), clear interpreter flag
144 clear histories flag (boolean) and run in console flag (boolean) 147 (boolean), clear histories flag (boolean) and run in console
148 flag (boolean)
145 """ 149 """
146 cmdLine = self.ui.cmdlineCombo.currentText() 150 cmdLine = self.ui.cmdlineCombo.currentText()
147 workdir = self.ui.workdirCombo.currentText() 151 workdir = self.ui.workdirCombo.currentText()
148 environment = self.ui.environmentCombo.currentText() 152 environment = self.ui.environmentCombo.currentText()
149 153
155 self.__clearHistoryLists, 159 self.__clearHistoryLists,
156 self.ui.consoleCheckBox.isChecked()) 160 self.ui.consoleCheckBox.isChecked())
157 161
158 def getDebugData(self): 162 def getDebugData(self):
159 """ 163 """
160 Public method to retrieve the debug related data entered into this dialog. 164 Public method to retrieve the debug related data entered into this
161 165 dialog.
162 @return a tuple of a flag indicating, if the Python library should be traced 166
163 as well, a flag indicating, that the debugger should not stop at the 167 @return a tuple of a flag indicating, if the Python library should be
164 first executable line (boolean), a flag indicating, that the debugger 168 traced as well, a flag indicating, that the debugger should not
165 should fork automatically (boolean) and a flag indicating, that the 169 stop at the first executable line (boolean), a flag indicating,
166 debugger should debug the child process after forking automatically (boolean) 170 that the debugger should fork automatically (boolean) and a flag
171 indicating, that the debugger should debug the child process after
172 forking automatically (boolean)
167 """ 173 """
168 if self.type == 0: 174 if self.type == 0:
169 return (self.ui.tracePythonCheckBox.isChecked(), 175 return (self.ui.tracePythonCheckBox.isChecked(),
170 self.ui.autoContinueCheckBox.isChecked(), 176 self.ui.autoContinueCheckBox.isChecked(),
171 self.ui.forkModeCheckBox.isChecked(), 177 self.ui.forkModeCheckBox.isChecked(),
172 self.ui.forkChildCheckBox.isChecked()) 178 self.ui.forkChildCheckBox.isChecked())
173 179
174 def getRunData(self): 180 def getRunData(self):
175 """ 181 """
176 Public method to retrieve the debug related data entered into this dialog. 182 Public method to retrieve the debug related data entered into this
177 183 dialog.
178 @return a tuple of a flag indicating, that the debugger should fork automatically 184
179 (boolean) and a flag indicating, that the debugger should debug the child 185 @return a tuple of a flag indicating, that the debugger should fork
180 process after forking automatically (boolean) 186 automatically (boolean) and a flag indicating, that the debugger
187 should debug the child process after forking automatically
188 (boolean)
181 """ 189 """
182 if self.type == 1: 190 if self.type == 1:
183 return (self.ui.forkModeCheckBox.isChecked(), 191 return (self.ui.forkModeCheckBox.isChecked(),
184 self.ui.forkChildCheckBox.isChecked()) 192 self.ui.forkChildCheckBox.isChecked())
185 193
186 def getCoverageData(self): 194 def getCoverageData(self):
187 """ 195 """
188 Public method to retrieve the coverage related data entered into this dialog. 196 Public method to retrieve the coverage related data entered into this
197 dialog.
189 198
190 @return flag indicating erasure of coverage info (boolean) 199 @return flag indicating erasure of coverage info (boolean)
191 """ 200 """
192 if self.type == 2: 201 if self.type == 2:
193 return self.ui.eraseCheckBox.isChecked() 202 return self.ui.eraseCheckBox.isChecked()
194 203
195 def getProfilingData(self): 204 def getProfilingData(self):
196 """ 205 """
197 Public method to retrieve the profiling related data entered into this dialog. 206 Public method to retrieve the profiling related data entered into this
207 dialog.
198 208
199 @return flag indicating erasure of profiling info (boolean) 209 @return flag indicating erasure of profiling info (boolean)
200 """ 210 """
201 if self.type == 3: 211 if self.type == 3:
202 return self.ui.eraseCheckBox.isChecked() 212 return self.ui.eraseCheckBox.isChecked()

eric ide

mercurial