Debugger/DebugViewer.py

changeset 3021
801289962f4e
parent 2988
f53c03574697
child 3058
0a02c433f52d
child 3160
209a07d7e401
equal deleted inserted replaced
3020:542e97d4ecb3 3021:801289962f4e
81 if embeddedShell: 81 if embeddedShell:
82 from QScintilla.Shell import ShellAssembly 82 from QScintilla.Shell import ShellAssembly
83 # add the interpreter shell 83 # add the interpreter shell
84 self.shellAssembly = ShellAssembly(debugServer, vm, False) 84 self.shellAssembly = ShellAssembly(debugServer, vm, False)
85 self.shell = self.shellAssembly.shell() 85 self.shell = self.shellAssembly.shell()
86 index = self.__tabWidget.addTab(self.shellAssembly, 86 index = self.__tabWidget.addTab(
87 self.shellAssembly,
87 UI.PixmapCache.getIcon("shell.png"), '') 88 UI.PixmapCache.getIcon("shell.png"), '')
88 self.__tabWidget.setTabToolTip(index, self.shell.windowTitle()) 89 self.__tabWidget.setTabToolTip(index, self.shell.windowTitle())
89 90
90 self.embeddedBrowser = embeddedBrowser 91 self.embeddedBrowser = embeddedBrowser
91 if embeddedBrowser: 92 if embeddedBrowser:
92 from UI.Browser import Browser 93 from UI.Browser import Browser
93 # add the browser 94 # add the browser
94 self.browser = Browser() 95 self.browser = Browser()
95 index = self.__tabWidget.addTab(self.browser, 96 index = self.__tabWidget.addTab(
97 self.browser,
96 UI.PixmapCache.getIcon("browser.png"), '') 98 UI.PixmapCache.getIcon("browser.png"), '')
97 self.__tabWidget.setTabToolTip(index, self.browser.windowTitle()) 99 self.__tabWidget.setTabToolTip(index, self.browser.windowTitle())
98 100
99 from .VariablesViewer import VariablesViewer 101 from .VariablesViewer import VariablesViewer
100 # add the global variables viewer 102 # add the global variables viewer
126 self.setGlobalsFilterButton = QPushButton( 128 self.setGlobalsFilterButton = QPushButton(
127 self.trUtf8('Set'), self.glvWidget) 129 self.trUtf8('Set'), self.glvWidget)
128 self.glvWidgetHLayout.addWidget(self.setGlobalsFilterButton) 130 self.glvWidgetHLayout.addWidget(self.setGlobalsFilterButton)
129 self.glvWidgetVLayout.addLayout(self.glvWidgetHLayout) 131 self.glvWidgetVLayout.addLayout(self.glvWidgetHLayout)
130 132
131 index = self.__tabWidget.addTab(self.glvWidget, 133 index = self.__tabWidget.addTab(
134 self.glvWidget,
132 UI.PixmapCache.getIcon("globalVariables.png"), '') 135 UI.PixmapCache.getIcon("globalVariables.png"), '')
133 self.__tabWidget.setTabToolTip(index, self.globalsViewer.windowTitle()) 136 self.__tabWidget.setTabToolTip(index, self.globalsViewer.windowTitle())
134 137
135 self.setGlobalsFilterButton.clicked[()].connect( 138 self.setGlobalsFilterButton.clicked[()].connect(
136 self.__setGlobalsFilter) 139 self.__setGlobalsFilter)
179 self.setLocalsFilterButton = QPushButton( 182 self.setLocalsFilterButton = QPushButton(
180 self.trUtf8('Set'), self.lvWidget) 183 self.trUtf8('Set'), self.lvWidget)
181 self.lvWidgetHLayout2.addWidget(self.setLocalsFilterButton) 184 self.lvWidgetHLayout2.addWidget(self.setLocalsFilterButton)
182 self.lvWidgetVLayout.addLayout(self.lvWidgetHLayout2) 185 self.lvWidgetVLayout.addLayout(self.lvWidgetHLayout2)
183 186
184 index = self.__tabWidget.addTab(self.lvWidget, 187 index = self.__tabWidget.addTab(
188 self.lvWidget,
185 UI.PixmapCache.getIcon("localVariables.png"), '') 189 UI.PixmapCache.getIcon("localVariables.png"), '')
186 self.__tabWidget.setTabToolTip(index, self.localsViewer.windowTitle()) 190 self.__tabWidget.setTabToolTip(index, self.localsViewer.windowTitle())
187 191
188 self.sourceButton.clicked[()].connect(self.__showSource) 192 self.sourceButton.clicked[()].connect(self.__showSource)
189 self.stackComboBox.currentIndexChanged[int].connect( 193 self.stackComboBox.currentIndexChanged[int].connect(
192 self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter) 196 self.localsFilterEdit.returnPressed.connect(self.__setLocalsFilter)
193 197
194 from .CallStackViewer import CallStackViewer 198 from .CallStackViewer import CallStackViewer
195 # add the call stack viewer 199 # add the call stack viewer
196 self.callStackViewer = CallStackViewer(self.debugServer) 200 self.callStackViewer = CallStackViewer(self.debugServer)
197 index = self.__tabWidget.addTab(self.callStackViewer, 201 index = self.__tabWidget.addTab(
202 self.callStackViewer,
198 UI.PixmapCache.getIcon("step.png"), "") 203 UI.PixmapCache.getIcon("step.png"), "")
199 self.__tabWidget.setTabToolTip( 204 self.__tabWidget.setTabToolTip(
200 index, self.callStackViewer.windowTitle()) 205 index, self.callStackViewer.windowTitle())
201 self.callStackViewer.sourceFile.connect(self.sourceFile) 206 self.callStackViewer.sourceFile.connect(self.sourceFile)
202 self.callStackViewer.frameSelected.connect( 207 self.callStackViewer.frameSelected.connect(
203 self.__callStackFrameSelected) 208 self.__callStackFrameSelected)
204 209
205 from .CallTraceViewer import CallTraceViewer 210 from .CallTraceViewer import CallTraceViewer
206 # add the call trace viewer 211 # add the call trace viewer
207 self.callTraceViewer = CallTraceViewer(self.debugServer) 212 self.callTraceViewer = CallTraceViewer(self.debugServer)
208 index = self.__tabWidget.addTab(self.callTraceViewer, 213 index = self.__tabWidget.addTab(
214 self.callTraceViewer,
209 UI.PixmapCache.getIcon("callTrace.png"), "") 215 UI.PixmapCache.getIcon("callTrace.png"), "")
210 self.__tabWidget.setTabToolTip( 216 self.__tabWidget.setTabToolTip(
211 index, self.callTraceViewer.windowTitle()) 217 index, self.callTraceViewer.windowTitle())
212 self.callTraceViewer.sourceFile.connect(self.sourceFile) 218 self.callTraceViewer.sourceFile.connect(self.sourceFile)
213 219
214 from .BreakPointViewer import BreakPointViewer 220 from .BreakPointViewer import BreakPointViewer
215 # add the breakpoint viewer 221 # add the breakpoint viewer
216 self.breakpointViewer = BreakPointViewer() 222 self.breakpointViewer = BreakPointViewer()
217 self.breakpointViewer.setModel(self.debugServer.getBreakPointModel()) 223 self.breakpointViewer.setModel(self.debugServer.getBreakPointModel())
218 index = self.__tabWidget.addTab(self.breakpointViewer, 224 index = self.__tabWidget.addTab(
225 self.breakpointViewer,
219 UI.PixmapCache.getIcon("breakpoints.png"), '') 226 UI.PixmapCache.getIcon("breakpoints.png"), '')
220 self.__tabWidget.setTabToolTip( 227 self.__tabWidget.setTabToolTip(
221 index, self.breakpointViewer.windowTitle()) 228 index, self.breakpointViewer.windowTitle())
222 self.breakpointViewer.sourceFile.connect(self.sourceFile) 229 self.breakpointViewer.sourceFile.connect(self.sourceFile)
223 230
224 from .WatchPointViewer import WatchPointViewer 231 from .WatchPointViewer import WatchPointViewer
225 # add the watch expression viewer 232 # add the watch expression viewer
226 self.watchpointViewer = WatchPointViewer() 233 self.watchpointViewer = WatchPointViewer()
227 self.watchpointViewer.setModel(self.debugServer.getWatchPointModel()) 234 self.watchpointViewer.setModel(self.debugServer.getWatchPointModel())
228 index = self.__tabWidget.addTab(self.watchpointViewer, 235 index = self.__tabWidget.addTab(
236 self.watchpointViewer,
229 UI.PixmapCache.getIcon("watchpoints.png"), '') 237 UI.PixmapCache.getIcon("watchpoints.png"), '')
230 self.__tabWidget.setTabToolTip( 238 self.__tabWidget.setTabToolTip(
231 index, self.watchpointViewer.windowTitle()) 239 index, self.watchpointViewer.windowTitle())
232 240
233 from .ExceptionLogger import ExceptionLogger 241 from .ExceptionLogger import ExceptionLogger
234 # add the exception logger 242 # add the exception logger
235 self.exceptionLogger = ExceptionLogger() 243 self.exceptionLogger = ExceptionLogger()
236 index = self.__tabWidget.addTab(self.exceptionLogger, 244 index = self.__tabWidget.addTab(
245 self.exceptionLogger,
237 UI.PixmapCache.getIcon("exceptions.png"), '') 246 UI.PixmapCache.getIcon("exceptions.png"), '')
238 self.__tabWidget.setTabToolTip( 247 self.__tabWidget.setTabToolTip(
239 index, self.exceptionLogger.windowTitle()) 248 index, self.exceptionLogger.windowTitle())
240 249
241 if self.embeddedShell: 250 if self.embeddedShell:

eric ide

mercurial