Debugger/DebugViewer.py

changeset 2400
c1726b754f96
parent 2302
f29e9405c851
child 2525
8b507a9a2d40
child 2622
08cc2f31c983
equal deleted inserted replaced
2397:671d0d55e5c8 2400:c1726b754f96
23 import os 23 import os
24 24
25 from PyQt4.QtCore import pyqtSignal 25 from PyQt4.QtCore import pyqtSignal
26 from PyQt4.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QLineEdit, QSizePolicy, \ 26 from PyQt4.QtGui import QWidget, QVBoxLayout, QHBoxLayout, QLineEdit, QSizePolicy, \
27 QPushButton, QComboBox, QLabel, QTreeWidget, QTreeWidgetItem, QHeaderView 27 QPushButton, QComboBox, QLabel, QTreeWidget, QTreeWidgetItem, QHeaderView
28
29 from QScintilla.Shell import ShellAssembly
30 from .VariablesViewer import VariablesViewer
31 from .ExceptionLogger import ExceptionLogger
32 from .BreakPointViewer import BreakPointViewer
33 from .WatchPointViewer import WatchPointViewer
34 from .CallTraceViewer import CallTraceViewer
35 28
36 import UI.PixmapCache 29 import UI.PixmapCache
37 import Preferences 30 import Preferences
38 31
39 from E5Gui.E5TabWidget import E5TabWidget 32 from E5Gui.E5TabWidget import E5TabWidget
83 self.__tabWidget = E5TabWidget() 76 self.__tabWidget = E5TabWidget()
84 self.__mainLayout.addWidget(self.__tabWidget) 77 self.__mainLayout.addWidget(self.__tabWidget)
85 78
86 self.embeddedShell = embeddedShell 79 self.embeddedShell = embeddedShell
87 if embeddedShell: 80 if embeddedShell:
81 from QScintilla.Shell import ShellAssembly
88 # add the interpreter shell 82 # add the interpreter shell
89 self.shellAssembly = ShellAssembly(debugServer, vm, False) 83 self.shellAssembly = ShellAssembly(debugServer, vm, False)
90 self.shell = self.shellAssembly.shell() 84 self.shell = self.shellAssembly.shell()
91 index = self.__tabWidget.addTab(self.shellAssembly, 85 index = self.__tabWidget.addTab(self.shellAssembly,
92 UI.PixmapCache.getIcon("shell.png"), '') 86 UI.PixmapCache.getIcon("shell.png"), '')
99 self.browser = Browser() 93 self.browser = Browser()
100 index = self.__tabWidget.addTab(self.browser, 94 index = self.__tabWidget.addTab(self.browser,
101 UI.PixmapCache.getIcon("browser.png"), '') 95 UI.PixmapCache.getIcon("browser.png"), '')
102 self.__tabWidget.setTabToolTip(index, self.browser.windowTitle()) 96 self.__tabWidget.setTabToolTip(index, self.browser.windowTitle())
103 97
98 from .VariablesViewer import VariablesViewer
104 # add the global variables viewer 99 # add the global variables viewer
105 self.glvWidget = QWidget() 100 self.glvWidget = QWidget()
106 self.glvWidgetVLayout = QVBoxLayout(self.glvWidget) 101 self.glvWidgetVLayout = QVBoxLayout(self.glvWidget)
107 self.glvWidgetVLayout.setMargin(0) 102 self.glvWidgetVLayout.setMargin(0)
108 self.glvWidgetVLayout.setSpacing(3) 103 self.glvWidgetVLayout.setSpacing(3)
183 self.sourceButton.clicked[()].connect(self.__showSource) 178 self.sourceButton.clicked[()].connect(self.__showSource)
184 self.stackComboBox.activated[int].connect(self.__frameSelected) 179 self.stackComboBox.activated[int].connect(self.__frameSelected)
185 self.setLocalsFilterButton.clicked[()].connect(self.__setLocalsFilter) 180 self.setLocalsFilterButton.clicked[()].connect(self.__setLocalsFilter)
186 self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter) 181 self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter)
187 182
183 from .CallTraceViewer import CallTraceViewer
188 # add the call trace viewer 184 # add the call trace viewer
189 self.callTraceViewer = CallTraceViewer(self.debugServer) 185 self.callTraceViewer = CallTraceViewer(self.debugServer)
190 index = self.__tabWidget.addTab(self.callTraceViewer, 186 index = self.__tabWidget.addTab(self.callTraceViewer,
191 UI.PixmapCache.getIcon("callTrace.png"), "") 187 UI.PixmapCache.getIcon("callTrace.png"), "")
192 self.__tabWidget.setTabToolTip(index, self.callTraceViewer.windowTitle()) 188 self.__tabWidget.setTabToolTip(index, self.callTraceViewer.windowTitle())
193 self.callTraceViewer.sourceFile.connect(self.sourceFile) 189 self.callTraceViewer.sourceFile.connect(self.sourceFile)
194 190
191 from .BreakPointViewer import BreakPointViewer
195 # add the breakpoint viewer 192 # add the breakpoint viewer
196 self.breakpointViewer = BreakPointViewer() 193 self.breakpointViewer = BreakPointViewer()
197 self.breakpointViewer.setModel(self.debugServer.getBreakPointModel()) 194 self.breakpointViewer.setModel(self.debugServer.getBreakPointModel())
198 index = self.__tabWidget.addTab(self.breakpointViewer, 195 index = self.__tabWidget.addTab(self.breakpointViewer,
199 UI.PixmapCache.getIcon("breakpoints.png"), '') 196 UI.PixmapCache.getIcon("breakpoints.png"), '')
200 self.__tabWidget.setTabToolTip(index, self.breakpointViewer.windowTitle()) 197 self.__tabWidget.setTabToolTip(index, self.breakpointViewer.windowTitle())
201 self.breakpointViewer.sourceFile.connect(self.sourceFile) 198 self.breakpointViewer.sourceFile.connect(self.sourceFile)
202 199
200 from .WatchPointViewer import WatchPointViewer
203 # add the watch expression viewer 201 # add the watch expression viewer
204 self.watchpointViewer = WatchPointViewer() 202 self.watchpointViewer = WatchPointViewer()
205 self.watchpointViewer.setModel(self.debugServer.getWatchPointModel()) 203 self.watchpointViewer.setModel(self.debugServer.getWatchPointModel())
206 index = self.__tabWidget.addTab(self.watchpointViewer, 204 index = self.__tabWidget.addTab(self.watchpointViewer,
207 UI.PixmapCache.getIcon("watchpoints.png"), '') 205 UI.PixmapCache.getIcon("watchpoints.png"), '')
208 self.__tabWidget.setTabToolTip(index, self.watchpointViewer.windowTitle()) 206 self.__tabWidget.setTabToolTip(index, self.watchpointViewer.windowTitle())
209 207
208 from .ExceptionLogger import ExceptionLogger
210 # add the exception logger 209 # add the exception logger
211 self.exceptionLogger = ExceptionLogger() 210 self.exceptionLogger = ExceptionLogger()
212 index = self.__tabWidget.addTab(self.exceptionLogger, 211 index = self.__tabWidget.addTab(self.exceptionLogger,
213 UI.PixmapCache.getIcon("exceptions.png"), '') 212 UI.PixmapCache.getIcon("exceptions.png"), '')
214 self.__tabWidget.setTabToolTip(index, self.exceptionLogger.windowTitle()) 213 self.__tabWidget.setTabToolTip(index, self.exceptionLogger.windowTitle())

eric ide

mercurial