Debugger/DebugUI.py

changeset 406
eacf81fad150
parent 112
16893e193e9d
child 453
a81097a85889
equal deleted inserted replaced
405:374066392929 406:eacf81fad150
1289 index = model.index(row, 0) 1289 index = model.index(row, 0)
1290 filename, line, cond = model.getBreakPointByIndex(index)[:3] 1290 filename, line, cond = model.getBreakPointByIndex(index)[:3]
1291 if not cond: 1291 if not cond:
1292 formattedCond = "" 1292 formattedCond = ""
1293 else: 1293 else:
1294 formattedCond = " : %s" % cond[:20] 1294 formattedCond = " : {0}".format(cond[:20])
1295 bpSuffix = " : %d%s" % (line, formattedCond) 1295 bpSuffix = " : {0:d}{1}".format(line, formattedCond)
1296 act = self.breakpointsMenu.addAction( 1296 act = self.breakpointsMenu.addAction(
1297 "%s%s" % ( 1297 "{0}{1}".format(
1298 Utilities.compactPath( 1298 Utilities.compactPath(
1299 filename, 1299 filename,
1300 self.ui.maxMenuFilePathLen - len(bpSuffix)), 1300 self.ui.maxMenuFilePathLen - len(bpSuffix)),
1301 bpSuffix)) 1301 bpSuffix))
1302 act.setData([filename, line]) 1302 act.setData([filename, line])
1414 # Hide all error highlights 1414 # Hide all error highlights
1415 self.viewmanager.unhighlight() 1415 self.viewmanager.unhighlight()
1416 1416
1417 if not doNotStart: 1417 if not doNotStart:
1418 if runProject and self.project.getProjectType() == "E4Plugin": 1418 if runProject and self.project.getProjectType() == "E4Plugin":
1419 argv = "--plugin=%s %s" % (fn, argv) 1419 argv = "--plugin={0} {1}".format(fn, argv)
1420 fn = os.path.join(getConfig('ericDir'), "eric5.py") 1420 fn = os.path.join(getConfig('ericDir'), "eric5.py")
1421 1421
1422 # Ask the client to open the new program. 1422 # Ask the client to open the new program.
1423 self.debugServer.remoteCoverage(fn, argv, wd, env, 1423 self.debugServer.remoteCoverage(fn, argv, wd, env,
1424 autoClearShell = self.autoClearShell, erase = eraseCoverage, 1424 autoClearShell = self.autoClearShell, erase = eraseCoverage,
1518 # Hide all error highlights 1518 # Hide all error highlights
1519 self.viewmanager.unhighlight() 1519 self.viewmanager.unhighlight()
1520 1520
1521 if not doNotStart: 1521 if not doNotStart:
1522 if runProject and self.project.getProjectType() == "E4Plugin": 1522 if runProject and self.project.getProjectType() == "E4Plugin":
1523 argv = "--plugin=%s %s" % (fn, argv) 1523 argv = "--plugin={0} {1}".format(fn, argv)
1524 fn = os.path.join(getConfig('ericDir'), "eric5.py") 1524 fn = os.path.join(getConfig('ericDir'), "eric5.py")
1525 1525
1526 # Ask the client to open the new program. 1526 # Ask the client to open the new program.
1527 self.debugServer.remoteProfile(fn, argv, wd, env, 1527 self.debugServer.remoteProfile(fn, argv, wd, env,
1528 autoClearShell = self.autoClearShell, erase = eraseTimings, 1528 autoClearShell = self.autoClearShell, erase = eraseTimings,
1625 # Hide all error highlights 1625 # Hide all error highlights
1626 self.viewmanager.unhighlight() 1626 self.viewmanager.unhighlight()
1627 1627
1628 if not doNotStart: 1628 if not doNotStart:
1629 if runProject and self.project.getProjectType() == "E4Plugin": 1629 if runProject and self.project.getProjectType() == "E4Plugin":
1630 argv = "--plugin=%s %s" % (fn, argv) 1630 argv = "--plugin={0} {1}".format(fn, argv)
1631 fn = os.path.join(getConfig('ericDir'), "eric5.py") 1631 fn = os.path.join(getConfig('ericDir'), "eric5.py")
1632 1632
1633 # Ask the client to open the new program. 1633 # Ask the client to open the new program.
1634 self.debugServer.remoteRun(fn, argv, wd, env, 1634 self.debugServer.remoteRun(fn, argv, wd, env,
1635 autoClearShell = self.autoClearShell, forProject = runProject, 1635 autoClearShell = self.autoClearShell, forProject = runProject,
1740 # Hide all error highlights 1740 # Hide all error highlights
1741 self.viewmanager.unhighlight() 1741 self.viewmanager.unhighlight()
1742 1742
1743 if not doNotStart: 1743 if not doNotStart:
1744 if debugProject and self.project.getProjectType() == "E4Plugin": 1744 if debugProject and self.project.getProjectType() == "E4Plugin":
1745 argv = "--plugin=%s %s" % (fn, argv) 1745 argv = "--plugin={0} {1}".format(fn, argv)
1746 fn = os.path.join(getConfig('ericDir'), "eric5.py") 1746 fn = os.path.join(getConfig('ericDir'), "eric5.py")
1747 tracePython = True # override flag because it must be true 1747 tracePython = True # override flag because it must be true
1748 1748
1749 # Ask the client to open the new program. 1749 # Ask the client to open the new program.
1750 self.debugServer.remoteLoad(fn, argv, wd, env, 1750 self.debugServer.remoteLoad(fn, argv, wd, env,
1791 # Hide all error highlights 1791 # Hide all error highlights
1792 self.viewmanager.unhighlight() 1792 self.viewmanager.unhighlight()
1793 1793
1794 if not doNotStart: 1794 if not doNotStart:
1795 if forProject and self.project.getProjectType() == "E4Plugin": 1795 if forProject and self.project.getProjectType() == "E4Plugin":
1796 argv = "--plugin=%s %s" % (fn, argv) 1796 argv = "--plugin={0} {1}".format(fn, argv)
1797 fn = os.path.join(getConfig('ericDir'), "eric5.py") 1797 fn = os.path.join(getConfig('ericDir'), "eric5.py")
1798 1798
1799 if self.lastStartAction in [1, 2]: 1799 if self.lastStartAction in [1, 2]:
1800 # Ask the client to debug the new program. 1800 # Ask the client to debug the new program.
1801 self.debugServer.remoteLoad(fn, argv, wd, env, 1801 self.debugServer.remoteLoad(fn, argv, wd, env,

eric ide

mercurial