186 self.actions.append(self.runProjectAct) |
186 self.actions.append(self.runProjectAct) |
187 |
187 |
188 self.coverageAct = E5Action(self.trUtf8('Coverage run of Script'), |
188 self.coverageAct = E5Action(self.trUtf8('Coverage run of Script'), |
189 UI.PixmapCache.getIcon("coverageScript.png"), |
189 UI.PixmapCache.getIcon("coverageScript.png"), |
190 self.trUtf8('Coverage run of Script...'),0,0,self,'dbg_coverage_script') |
190 self.trUtf8('Coverage run of Script...'),0,0,self,'dbg_coverage_script') |
191 self.coverageAct.setStatusTip(\ |
191 self.coverageAct.setStatusTip( |
192 self.trUtf8('Perform a coverage run of the current Script')) |
192 self.trUtf8('Perform a coverage run of the current Script')) |
193 self.coverageAct.setWhatsThis(self.trUtf8( |
193 self.coverageAct.setWhatsThis(self.trUtf8( |
194 """<b>Coverage run of Script</b>""" |
194 """<b>Coverage run of Script</b>""" |
195 """<p>Set the command line arguments and run the script under the control""" |
195 """<p>Set the command line arguments and run the script under the control""" |
196 """ of a coverage analysis tool. If the file has unsaved changes it may be""" |
196 """ of a coverage analysis tool. If the file has unsaved changes it may be""" |
200 self.actions.append(self.coverageAct) |
200 self.actions.append(self.coverageAct) |
201 |
201 |
202 self.coverageProjectAct = E5Action(self.trUtf8('Coverage run of Project'), |
202 self.coverageProjectAct = E5Action(self.trUtf8('Coverage run of Project'), |
203 UI.PixmapCache.getIcon("coverageProject.png"), |
203 UI.PixmapCache.getIcon("coverageProject.png"), |
204 self.trUtf8('Coverage run of Project...'),0,0,self,'dbg_coverage_project') |
204 self.trUtf8('Coverage run of Project...'),0,0,self,'dbg_coverage_project') |
205 self.coverageProjectAct.setStatusTip(\ |
205 self.coverageProjectAct.setStatusTip( |
206 self.trUtf8('Perform a coverage run of the current Project')) |
206 self.trUtf8('Perform a coverage run of the current Project')) |
207 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
207 self.coverageProjectAct.setWhatsThis(self.trUtf8( |
208 """<b>Coverage run of Project</b>""" |
208 """<b>Coverage run of Project</b>""" |
209 """<p>Set the command line arguments and run the current project""" |
209 """<p>Set the command line arguments and run the current project""" |
210 """ under the control of a coverage analysis tool.""" |
210 """ under the control of a coverage analysis tool.""" |
296 |
296 |
297 act = E5Action(self.trUtf8('Continue'), |
297 act = E5Action(self.trUtf8('Continue'), |
298 UI.PixmapCache.getIcon("continue.png"), |
298 UI.PixmapCache.getIcon("continue.png"), |
299 self.trUtf8('&Continue'),Qt.Key_F6,0, |
299 self.trUtf8('&Continue'),Qt.Key_F6,0, |
300 self.debugActGrp,'dbg_continue') |
300 self.debugActGrp,'dbg_continue') |
301 act.setStatusTip(\ |
301 act.setStatusTip( |
302 self.trUtf8('Continue running the program from the current line')) |
302 self.trUtf8('Continue running the program from the current line')) |
303 act.setWhatsThis(self.trUtf8( |
303 act.setWhatsThis(self.trUtf8( |
304 """<b>Continue</b>""" |
304 """<b>Continue</b>""" |
305 """<p>Continue running the program from the current line. The program will""" |
305 """<p>Continue running the program from the current line. The program will""" |
306 """ stop when it terminates or when a breakpoint is reached.</p>""" |
306 """ stop when it terminates or when a breakpoint is reached.</p>""" |
397 self.actions.append(act) |
397 self.actions.append(act) |
398 |
398 |
399 act = E5Action(self.trUtf8('Execute'), |
399 act = E5Action(self.trUtf8('Execute'), |
400 self.trUtf8('E&xecute...'), |
400 self.trUtf8('E&xecute...'), |
401 0,0,self.debugActGrp2,'dbg_execute') |
401 0,0,self.debugActGrp2,'dbg_execute') |
402 act.setStatusTip(\ |
402 act.setStatusTip( |
403 self.trUtf8('Execute a one line statement in the current context')) |
403 self.trUtf8('Execute a one line statement in the current context')) |
404 act.setWhatsThis(self.trUtf8( |
404 act.setWhatsThis(self.trUtf8( |
405 """<b>Execute</b>""" |
405 """<b>Execute</b>""" |
406 """<p>Execute a one line statement in the current context""" |
406 """<p>Execute a one line statement in the current context""" |
407 """ of the debugged program.</p>""" |
407 """ of the debugged program.</p>""" |
817 def __projectOpened(self): |
817 def __projectOpened(self): |
818 """ |
818 """ |
819 Private slot to handle the projectOpened signal. |
819 Private slot to handle the projectOpened signal. |
820 """ |
820 """ |
821 self.projectOpen = True |
821 self.projectOpen = True |
822 cap = self.debugServer.getClientCapabilities(\ |
822 cap = self.debugServer.getClientCapabilities( |
823 self.project.pdata["PROGLANGUAGE"][0]) |
823 self.project.pdata["PROGLANGUAGE"][0]) |
824 if not self.passive: |
824 if not self.passive: |
825 self.debugProjectAct.setEnabled(cap & HasDebugger) |
825 self.debugProjectAct.setEnabled(cap & HasDebugger) |
826 self.runProjectAct.setEnabled(cap & HasInterpreter) |
826 self.runProjectAct.setEnabled(cap & HasInterpreter) |
827 self.profileProjectAct.setEnabled(cap & HasProfiler) |
827 self.profileProjectAct.setEnabled(cap & HasProfiler) |
1001 if Preferences.getDebugger("BreakAlways"): |
1001 if Preferences.getDebugger("BreakAlways"): |
1002 res = E5MessageBox.Yes |
1002 res = E5MessageBox.Yes |
1003 else: |
1003 else: |
1004 if stackTrace: |
1004 if stackTrace: |
1005 if exceptionType.startswith('unhandled'): |
1005 if exceptionType.startswith('unhandled'): |
1006 buttons = E5MessageBox.StandardButtons(\ |
1006 buttons = E5MessageBox.StandardButtons( |
1007 E5MessageBox.No | \ |
1007 E5MessageBox.No | \ |
1008 E5MessageBox.Yes) |
1008 E5MessageBox.Yes) |
1009 else: |
1009 else: |
1010 buttons = E5MessageBox.StandardButtons(\ |
1010 buttons = E5MessageBox.StandardButtons( |
1011 E5MessageBox.No | \ |
1011 E5MessageBox.No | \ |
1012 E5MessageBox.Yes | \ |
1012 E5MessageBox.Yes | \ |
1013 E5MessageBox.Ignore) |
1013 E5MessageBox.Ignore) |
1014 res = E5MessageBox.critical(self.ui, Program, |
1014 res = E5MessageBox.critical(self.ui, Program, |
1015 self.trUtf8('<p>The debugged program raised the exception' |
1015 self.trUtf8('<p>The debugged program raised the exception' |
1171 if not wp: |
1171 if not wp: |
1172 return |
1172 return |
1173 |
1173 |
1174 cond, special, temp, enabled, count = wp[:5] |
1174 cond, special, temp, enabled, count = wp[:5] |
1175 |
1175 |
1176 dlg = EditWatchpointDialog(\ |
1176 dlg = EditWatchpointDialog( |
1177 (cond, temp, enabled, count, special), self) |
1177 (cond, temp, enabled, count, special), self) |
1178 if dlg.exec_() == QDialog.Accepted: |
1178 if dlg.exec_() == QDialog.Accepted: |
1179 cond, temp, enabled, count, special = dlg.getData() |
1179 cond, temp, enabled, count, special = dlg.getData() |
1180 |
1180 |
1181 # check for duplicates |
1181 # check for duplicates |
1909 if len(self.evalHistory) > 0: |
1909 if len(self.evalHistory) > 0: |
1910 curr = 0 |
1910 curr = 0 |
1911 else: |
1911 else: |
1912 curr = -1 |
1912 curr = -1 |
1913 |
1913 |
1914 arg, ok = QInputDialog.getItem(\ |
1914 arg, ok = QInputDialog.getItem( |
1915 self.ui, |
1915 self.ui, |
1916 self.trUtf8("Evaluate"), |
1916 self.trUtf8("Evaluate"), |
1917 self.trUtf8("Enter the statement to evaluate"), |
1917 self.trUtf8("Enter the statement to evaluate"), |
1918 self.evalHistory, |
1918 self.evalHistory, |
1919 curr, True) |
1919 curr, True) |
1938 if len(self.execHistory) > 0: |
1938 if len(self.execHistory) > 0: |
1939 curr = 0 |
1939 curr = 0 |
1940 else: |
1940 else: |
1941 curr = -1 |
1941 curr = -1 |
1942 |
1942 |
1943 stmt, ok = QInputDialog.getItem(\ |
1943 stmt, ok = QInputDialog.getItem( |
1944 self.ui, |
1944 self.ui, |
1945 self.trUtf8("Execute"), |
1945 self.trUtf8("Execute"), |
1946 self.trUtf8("Enter the statement to execute"), |
1946 self.trUtf8("Enter the statement to execute"), |
1947 self.execHistory, |
1947 self.execHistory, |
1948 curr, True) |
1948 curr, True) |