26 """ |
26 """ |
27 def __init__(self, caption, lastUsedVenvName, argvList, wdList, envList, |
27 def __init__(self, caption, lastUsedVenvName, argvList, wdList, envList, |
28 exceptions, |
28 exceptions, |
29 parent=None, dialogType=0, modfuncList=None, |
29 parent=None, dialogType=0, modfuncList=None, |
30 tracePython=False, autoClearShell=True, autoContinue=True, |
30 tracePython=False, autoClearShell=True, autoContinue=True, |
31 autoFork=False, forkChild=False, enableMultiprocess=False, |
31 enableMultiprocess=False, multiprocessNoDebugHistory=None): |
32 multiprocessNoDebugHistory=None): |
|
33 """ |
32 """ |
34 Constructor |
33 Constructor |
35 |
34 |
36 @param caption the caption to be displayed |
35 @param caption the caption to be displayed |
37 @type str |
36 @type str |
64 @param autoClearShell flag indicating, that the interpreter window |
63 @param autoClearShell flag indicating, that the interpreter window |
65 should be cleared automatically |
64 should be cleared automatically |
66 @type bool |
65 @type bool |
67 @param autoContinue flag indicating, that the debugger should not |
66 @param autoContinue flag indicating, that the debugger should not |
68 stop at the first executable line |
67 stop at the first executable line |
69 @type bool |
|
70 @param autoFork flag indicating the automatic fork mode |
|
71 @type bool |
|
72 @param forkChild flag indicating to debug the child after forking |
|
73 @type bool |
68 @type bool |
74 @param enableMultiprocess flag indicating the support for multi process |
69 @param enableMultiprocess flag indicating the support for multi process |
75 debugging |
70 debugging |
76 @type bool |
71 @type bool |
77 @param multiprocessNoDebugHistory list of lists with programs not to be |
72 @param multiprocessNoDebugHistory list of lists with programs not to be |
136 enableMultiprocessGlobal = Preferences.getDebugger( |
131 enableMultiprocessGlobal = Preferences.getDebugger( |
137 "MultiProcessEnabled") |
132 "MultiProcessEnabled") |
138 self.ui.tracePythonCheckBox.setChecked(tracePython) |
133 self.ui.tracePythonCheckBox.setChecked(tracePython) |
139 self.ui.tracePythonCheckBox.show() |
134 self.ui.tracePythonCheckBox.show() |
140 self.ui.autoContinueCheckBox.setChecked(autoContinue) |
135 self.ui.autoContinueCheckBox.setChecked(autoContinue) |
141 self.ui.forkModeCheckBox.setChecked(autoFork) |
|
142 self.ui.forkChildCheckBox.setChecked(forkChild) |
|
143 self.ui.multiprocessGroup.setEnabled(enableMultiprocessGlobal) |
136 self.ui.multiprocessGroup.setEnabled(enableMultiprocessGlobal) |
144 self.ui.multiprocessGroup.setChecked( |
137 self.ui.multiprocessGroup.setChecked( |
145 enableMultiprocess & enableMultiprocessGlobal) |
138 enableMultiprocess & enableMultiprocessGlobal) |
146 self.ui.multiprocessNoDebugCombo.clear() |
139 self.ui.multiprocessNoDebugCombo.clear() |
147 if multiprocessNoDebugHistory: |
140 if multiprocessNoDebugHistory: |
148 self.ui.multiprocessNoDebugCombo.addItems( |
141 self.ui.multiprocessNoDebugCombo.addItems( |
149 multiprocessNoDebugHistory) |
142 multiprocessNoDebugHistory) |
150 self.ui.multiprocessNoDebugCombo.setCurrentIndex(0) |
143 self.ui.multiprocessNoDebugCombo.setCurrentIndex(0) |
151 |
144 |
152 if dialogType == 1: # start run dialog |
|
153 self.ui.forkModeCheckBox.setChecked(autoFork) |
|
154 self.ui.forkChildCheckBox.setChecked(forkChild) |
|
155 |
|
156 if dialogType == 3: # start coverage or profile dialog |
145 if dialogType == 3: # start coverage or profile dialog |
157 self.ui.eraseCheckBox.setChecked(True) |
146 self.ui.eraseCheckBox.setChecked(True) |
158 |
147 |
159 self.__clearHistoryLists = False |
148 self.__clearHistoryLists = False |
160 self.__historiesModified = False |
149 self.__historiesModified = False |
196 Public method to retrieve the debug related data entered into this |
185 Public method to retrieve the debug related data entered into this |
197 dialog. |
186 dialog. |
198 |
187 |
199 @return a tuple of a flag indicating, if the Python library should be |
188 @return a tuple of a flag indicating, if the Python library should be |
200 traced as well, a flag indicating, that the debugger should not |
189 traced as well, a flag indicating, that the debugger should not |
201 stop at the first executable line, a flag indicating, that the |
190 stop at the first executable line, a flag indicating to support |
202 debugger should fork automatically, a flag indicating, that the |
191 multi process debugging and a space separated list of programs not |
203 debugger should debug the child process after forking |
192 to be debugged |
204 automatically, a flag indicating to support multi process debugging |
193 @rtype tuple of (bool, bool, bool, str) |
205 and a space separated list of programs not to be debugged |
|
206 @rtype tuple of (bool, bool, bool, bool, bool, str) |
|
207 """ |
194 """ |
208 if self.dialogType == 0: |
195 if self.dialogType == 0: |
209 return (self.ui.tracePythonCheckBox.isChecked(), |
196 return (self.ui.tracePythonCheckBox.isChecked(), |
210 self.ui.autoContinueCheckBox.isChecked(), |
197 self.ui.autoContinueCheckBox.isChecked(), |
211 self.ui.forkModeCheckBox.isChecked(), |
|
212 self.ui.forkChildCheckBox.isChecked(), |
|
213 self.ui.multiprocessGroup.isChecked(), |
198 self.ui.multiprocessGroup.isChecked(), |
214 self.ui.multiprocessNoDebugCombo.currentText()) |
199 self.ui.multiprocessNoDebugCombo.currentText()) |
215 else: |
200 else: |
216 return (False, False, False, False, False, []) |
201 return (False, False, False, "") |
217 |
202 |
218 def getRunData(self): |
|
219 """ |
|
220 Public method to retrieve the debug related data entered into this |
|
221 dialog. |
|
222 |
|
223 @return a tuple of a flag indicating, that the debugger should fork |
|
224 automatically (boolean) and a flag indicating, that the debugger |
|
225 should debug the child process after forking automatically |
|
226 (boolean) |
|
227 """ |
|
228 if self.dialogType == 1: |
|
229 return (self.ui.forkModeCheckBox.isChecked(), |
|
230 self.ui.forkChildCheckBox.isChecked()) |
|
231 else: |
|
232 return (False, False) |
|
233 |
|
234 def getCoverageData(self): |
203 def getCoverageData(self): |
235 """ |
204 """ |
236 Public method to retrieve the coverage related data entered into this |
205 Public method to retrieve the coverage related data entered into this |
237 dialog. |
206 dialog. |
238 |
207 |