29 def __init__(self, caption, lastUsedVenvName, argvList, wdList, envList, |
29 def __init__(self, caption, lastUsedVenvName, argvList, wdList, envList, |
30 exceptions, |
30 exceptions, |
31 parent=None, dialogType=0, modfuncList=None, |
31 parent=None, dialogType=0, modfuncList=None, |
32 tracePython=False, autoClearShell=True, autoContinue=True, |
32 tracePython=False, autoClearShell=True, autoContinue=True, |
33 enableMultiprocess=False, multiprocessNoDebugHistory=None, |
33 enableMultiprocess=False, multiprocessNoDebugHistory=None, |
34 enableConfigOverride=False, enableRedirect=True): |
34 configOverride=None): |
35 """ |
35 """ |
36 Constructor |
36 Constructor |
37 |
37 |
38 @param caption the caption to be displayed |
38 @param caption the caption to be displayed |
39 @type str |
39 @type str |
73 debugging |
73 debugging |
74 @type bool |
74 @type bool |
75 @param multiprocessNoDebugHistory list of lists with programs not to be |
75 @param multiprocessNoDebugHistory list of lists with programs not to be |
76 debugged |
76 debugged |
77 @type list of str |
77 @type list of str |
78 @param enableConfigOverride flag indicating to enable global config |
78 @param configOverride dictionary containing the global config override |
79 override |
79 data |
80 @type bool |
80 @type dict |
81 @param enableRedirect flag indicating to redirect stdin/stdout/stderr |
|
82 @type bool |
|
83 """ |
81 """ |
84 super(StartDialog, self).__init__(parent) |
82 super(StartDialog, self).__init__(parent) |
85 self.setModal(True) |
83 self.setModal(True) |
86 |
84 |
87 self.dialogType = dialogType |
85 self.dialogType = dialogType |
133 self.ui.consoleCheckBox.setEnabled( |
131 self.ui.consoleCheckBox.setEnabled( |
134 Preferences.getDebugger("ConsoleDbgCommand") != "") |
132 Preferences.getDebugger("ConsoleDbgCommand") != "") |
135 self.ui.consoleCheckBox.setChecked(False) |
133 self.ui.consoleCheckBox.setChecked(False) |
136 venvIndex = max(0, self.ui.venvComboBox.findText(lastUsedVenvName)) |
134 venvIndex = max(0, self.ui.venvComboBox.findText(lastUsedVenvName)) |
137 self.ui.venvComboBox.setCurrentIndex(venvIndex) |
135 self.ui.venvComboBox.setCurrentIndex(venvIndex) |
138 self.ui.globalOverrideGroup.setChecked(enableConfigOverride) |
136 self.ui.globalOverrideGroup.setChecked(configOverride["enable"]) |
139 self.ui.redirectCheckBox.setChecked(enableRedirect) |
137 self.ui.redirectCheckBox.setChecked(configOverride["redirect"]) |
140 |
138 |
141 if dialogType == 0: # start debug dialog |
139 if dialogType == 0: # start debug dialog |
142 enableMultiprocessGlobal = Preferences.getDebugger( |
140 enableMultiprocessGlobal = Preferences.getDebugger( |
143 "MultiProcessEnabled") |
141 "MultiProcessEnabled") |
144 self.ui.tracePythonCheckBox.setChecked(tracePython) |
142 self.ui.tracePythonCheckBox.setChecked(tracePython) |
199 def getGlobalOverrideData(self): |
197 def getGlobalOverrideData(self): |
200 """ |
198 """ |
201 Public method to retrieve the global configuration override data |
199 Public method to retrieve the global configuration override data |
202 entered into this dialog. |
200 entered into this dialog. |
203 |
201 |
204 @return tuple containing a flag indicating to activate the global |
202 @return dictionary containing a flag indicating to activate the global |
205 override and a flag indicating a redirect of stdin/stdout/stderr |
203 override and a flag indicating a redirect of stdin/stdout/stderr |
206 @rtype tuple of (bool, bool) |
204 @rtype dict |
207 """ |
205 """ |
208 return ( |
206 return { |
209 self.ui.globalOverrideGroup.isChecked(), |
207 "enable": self.ui.globalOverrideGroup.isChecked(), |
210 self.ui.redirectCheckBox.isChecked(), |
208 "redirect": self.ui.redirectCheckBox.isChecked(), |
211 ) |
209 } |
212 |
210 |
213 def getDebugData(self): |
211 def getDebugData(self): |
214 """ |
212 """ |
215 Public method to retrieve the debug related data entered into this |
213 Public method to retrieve the debug related data entered into this |
216 dialog. |
214 dialog. |