Debugger/DebugUI.py

changeset 2622
08cc2f31c983
parent 2430
fd7fa26076d2
child 2677
3d4277929fb3
child 2703
910bdc75c757
diff -r ab5918079c38 -r 08cc2f31c983 Debugger/DebugUI.py
--- a/Debugger/DebugUI.py	Thu Apr 25 19:53:25 2013 +0200
+++ b/Debugger/DebugUI.py	Fri Apr 26 19:37:21 2013 +0200
@@ -1029,7 +1029,7 @@
             res = None
             if stackTrace:
                 try:
-                    file, line = stackTrace[0]
+                    file, line = stackTrace[0][:2]
                     source, encoding = Utilities.readEncodedFile(file)
                     source = source.splitlines(True)
                     if len(source) >= line and \
@@ -1073,8 +1073,8 @@
             if res == E5MessageBox.Yes:
                 self.exceptionInterrupt.emit()
                 stack = []
-                for fn, ln in stackTrace:
-                    stack.append((fn, ln, ''))
+                for fn, ln, func, args in stackTrace:
+                    stack.append((fn, ln, func, args))
                 self.clientStack.emit(stack)
                 self.__getClientVariables()
                 self.ui.setDebugProfile()
@@ -1456,6 +1456,8 @@
                     argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
+                self.debugViewer.initCallStackViewer(runProject)
+                
                 # Ask the client to open the new program.
                 self.debugServer.remoteCoverage(fn, argv, wd, env,
                     autoClearShell=self.autoClearShell, erase=eraseCoverage,
@@ -1565,6 +1567,8 @@
                     argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
+                self.debugViewer.initCallStackViewer(runProject)
+                
                 # Ask the client to open the new program.
                 self.debugServer.remoteProfile(fn, argv, wd, env,
                     autoClearShell=self.autoClearShell, erase=eraseTimings,
@@ -1677,6 +1681,8 @@
                     argv = '--plugin="{0}" {1}'.format(fn, argv)
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                 
+                self.debugViewer.initCallStackViewer(runProject)
+                
                 # Ask the client to open the new program.
                 self.debugServer.remoteRun(fn, argv, wd, env,
                     autoClearShell=self.autoClearShell, forProject=runProject,
@@ -1797,6 +1803,8 @@
                     fn = os.path.join(getConfig('ericDir'), "eric5.py")
                     tracePython = True  # override flag because it must be true
                 
+                self.debugViewer.initCallStackViewer(debugProject)
+                
                 # Ask the client to send call trace info
                 enableCallTrace = self.debugViewer.isCallTraceEnabled()
                 self.debugViewer.clearCallTrace()
@@ -1853,6 +1861,8 @@
                 argv = '--plugin="{0}" {1}'.format(fn, argv)
                 fn = os.path.join(getConfig('ericDir'), "eric5.py")
             
+            self.debugViewer.initCallStackViewer(forProject)
+            
             if self.lastStartAction in [1, 2]:
                 # Ask the client to send call trace info
                 enableCallTrace = self.debugViewer.isCallTraceEnabled()
@@ -1918,6 +1928,9 @@
         # Signal that we have started a debugging session
         self.debuggingStarted.emit(fn)
         
+        # Initialize the call stack viewer
+        self.debugViewer.initCallStackViewer(False)
+        
     def __continue(self):
         """
         Private method to handle the Continue action.

eric ide

mercurial