src/eric7/Debugger/StartDialog.py

branch
eric7
changeset 10321
4a017fdf316f
parent 10306
904f4c7da759
child 10349
df7edc29cbfb
child 10417
c6011e501282
equal deleted inserted replaced
10320:ff28050f5dec 10321:4a017fdf316f
46 caption, 46 caption,
47 lastUsedVenvName, 47 lastUsedVenvName,
48 argvList, 48 argvList,
49 wdList, 49 wdList,
50 envList, 50 envList,
51 exceptions,
52 unhandledExceptions,
53 parent=None, 51 parent=None,
54 dialogMode=StartDialogMode.Debug, 52 dialogMode=StartDialogMode.Debug,
55 modfuncList=None, 53 modfuncList=None,
54 autoClearShell=True,
56 tracePython=False, 55 tracePython=False,
57 autoClearShell=True,
58 autoContinue=True, 56 autoContinue=True,
57 reportAllExceptions=False,
59 enableMultiprocess=False, 58 enableMultiprocess=False,
60 multiprocessNoDebugHistory=None, 59 multiprocessNoDebugHistory=None,
61 configOverride=None, 60 configOverride=None,
62 forProject=False, 61 forProject=False,
63 scriptName="", 62 scriptName="",
75 @type list of str 74 @type list of str
76 @param wdList history list of working directories 75 @param wdList history list of working directories
77 @type list of str 76 @type list of str
78 @param envList history list of environment parameter settings 77 @param envList history list of environment parameter settings
79 @type list of str 78 @type list of str
80 @param exceptions exception reporting flag
81 @type bool
82 @param unhandledExceptions flag indicating to always report unhandled exceptions
83 @type bool
84 @param parent parent widget of this dialog 79 @param parent parent widget of this dialog
85 @type QWidget 80 @type QWidget
86 @param dialogMode mode of the start dialog 81 @param dialogMode mode of the start dialog
87 <ul> 82 <ul>
88 <li>StartDialogMode.Debug = start debug dialog</li> 83 <li>StartDialogMode.Debug = start debug dialog</li>
91 <li>StartDialogMode.Profile = start profile dialog</li> 86 <li>StartDialogMode.Profile = start profile dialog</li>
92 </ul> 87 </ul>
93 @type StartDialogMode 88 @type StartDialogMode
94 @param modfuncList history list of module functions 89 @param modfuncList history list of module functions
95 @type list of str 90 @type list of str
91 @param autoClearShell flag indicating, that the interpreter window
92 should be cleared automatically
93 @type bool
96 @param tracePython flag indicating if the Python library should 94 @param tracePython flag indicating if the Python library should
97 be traced as well 95 be traced as well
98 @type bool 96 @type bool
99 @param autoClearShell flag indicating, that the interpreter window
100 should be cleared automatically
101 @type bool
102 @param autoContinue flag indicating, that the debugger should not 97 @param autoContinue flag indicating, that the debugger should not
103 stop at the first executable line 98 stop at the first executable line
99 @type bool
100 @param reportAllExceptions flag indicating to report all exceptions
104 @type bool 101 @type bool
105 @param enableMultiprocess flag indicating the support for multi process 102 @param enableMultiprocess flag indicating the support for multi process
106 debugging 103 debugging
107 @type bool 104 @type bool
108 @param multiprocessNoDebugHistory list of lists with programs not to be 105 @param multiprocessNoDebugHistory list of lists with programs not to be
190 ) 187 )
191 self.environmentCombo.lineEdit().setClearButtonEnabled(True) 188 self.environmentCombo.lineEdit().setClearButtonEnabled(True)
192 self.environmentCombo.clear() 189 self.environmentCombo.clear()
193 self.environmentCombo.addItems(envList) 190 self.environmentCombo.addItems(envList)
194 191
195 self.exceptionCheckBox.setChecked(exceptions)
196 self.unhandledExceptionCheckBox.setChecked(unhandledExceptions)
197 self.clearShellCheckBox.setChecked(autoClearShell) 192 self.clearShellCheckBox.setChecked(autoClearShell)
198 self.consoleCheckBox.setEnabled( 193 self.consoleCheckBox.setEnabled(
199 Preferences.getDebugger("ConsoleDbgCommand") != "" 194 Preferences.getDebugger("ConsoleDbgCommand") != ""
200 ) 195 )
201 self.consoleCheckBox.setChecked(False) 196 self.consoleCheckBox.setChecked(False)
211 if dialogMode == StartDialogMode.Debug: 206 if dialogMode == StartDialogMode.Debug:
212 enableMultiprocessGlobal = Preferences.getDebugger("MultiProcessEnabled") 207 enableMultiprocessGlobal = Preferences.getDebugger("MultiProcessEnabled")
213 self.tracePythonCheckBox.setChecked(tracePython) 208 self.tracePythonCheckBox.setChecked(tracePython)
214 self.tracePythonCheckBox.show() 209 self.tracePythonCheckBox.show()
215 self.autoContinueCheckBox.setChecked(autoContinue) 210 self.autoContinueCheckBox.setChecked(autoContinue)
211 self.allExceptionsCheckBox.setChecked(reportAllExceptions)
216 self.multiprocessGroup.setEnabled(enableMultiprocessGlobal) 212 self.multiprocessGroup.setEnabled(enableMultiprocessGlobal)
217 self.multiprocessGroup.setChecked( 213 self.multiprocessGroup.setChecked(
218 enableMultiprocess & enableMultiprocessGlobal 214 enableMultiprocess & enableMultiprocessGlobal
219 ) 215 )
220 self.multiprocessNoDebugCombo.clear() 216 self.multiprocessNoDebugCombo.clear()
258 254
259 def getData(self): 255 def getData(self):
260 """ 256 """
261 Public method to retrieve the data entered into this dialog. 257 Public method to retrieve the data entered into this dialog.
262 258
263 @return a tuple of virtual environment, script name, argv, workdir, 259 @return tuple containing the virtual environment, script name, argv, workdir,
264 environment, exceptions flag, unhandled exceptions flag, clear interpreter 260 environment, clear interpreter flag and run in console flag
265 flag and run in console flag 261 @rtype tuple of (str, str, str, str, str, bool, bool)
266 @rtype tuple of (str, str, str, str, str, bool, bool, bool, bool)
267 """ 262 """
268 cmdLine = self.cmdlineCombo.currentText() 263 cmdLine = self.cmdlineCombo.currentText()
269 workdir = self.workdirPicker.currentText(toNative=False) 264 workdir = self.workdirPicker.currentText(toNative=False)
270 environment = self.environmentCombo.currentText() 265 environment = self.environmentCombo.currentText()
271 venvName = self.venvComboBox.currentText() 266 venvName = self.venvComboBox.currentText()
279 venvName, 274 venvName,
280 scriptName, 275 scriptName,
281 cmdLine, 276 cmdLine,
282 workdir, 277 workdir,
283 environment, 278 environment,
284 self.exceptionCheckBox.isChecked(),
285 self.unhandledExceptionCheckBox.isChecked(),
286 self.clearShellCheckBox.isChecked(), 279 self.clearShellCheckBox.isChecked(),
287 self.consoleCheckBox.isChecked(), 280 self.consoleCheckBox.isChecked(),
288 ) 281 )
289 282
290 def getGlobalOverrideData(self): 283 def getGlobalOverrideData(self):
304 def getDebugData(self): 297 def getDebugData(self):
305 """ 298 """
306 Public method to retrieve the debug related data entered into this 299 Public method to retrieve the debug related data entered into this
307 dialog. 300 dialog.
308 301
309 @return a tuple of a flag indicating, if the Python library should be 302 @return tuple containing a flag indicating, if the Python library should be
310 traced as well, a flag indicating, that the debugger should not 303 traced as well, a flag indicating, that the debugger should not
311 stop at the first executable line, a flag indicating to support 304 stop at the first executable line, a flag indicating to report all
312 multi process debugging and a space separated list of programs not 305 exceptions, a flag indicating to support multi process debugging and a
313 to be debugged 306 space separated list of programs not to be debugged
314 @rtype tuple of (bool, bool, bool, str) 307 @rtype tuple of (bool, bool, bool, bool, str)
315 """ 308 """
316 if self.__dialogMode == StartDialogMode.Debug: 309 if self.__dialogMode == StartDialogMode.Debug:
317 return ( 310 return (
318 self.tracePythonCheckBox.isChecked(), 311 self.tracePythonCheckBox.isChecked(),
319 self.autoContinueCheckBox.isChecked(), 312 self.autoContinueCheckBox.isChecked(),
313 self.allExceptionsCheckBox.isChecked(),
320 self.multiprocessGroup.isChecked(), 314 self.multiprocessGroup.isChecked(),
321 self.multiprocessNoDebugCombo.currentText(), 315 self.multiprocessNoDebugCombo.currentText(),
322 ) 316 )
323 else: 317 else:
324 return (False, False, False, "") 318 return (False, False, False, False, "")
325 319
326 def getCoverageData(self): 320 def getCoverageData(self):
327 """ 321 """
328 Public method to retrieve the coverage related data entered into this 322 Public method to retrieve the coverage related data entered into this
329 dialog. 323 dialog.

eric ide

mercurial