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