Start an interactive debugging session. @type bConfirmQuit: bool @param bConfirmQuit: Set to C{True} to ask the user for confirmation before closing the session, C{False} otherwise. @type bShowBanner: bool @param bShowBanner: Set to C{True} to
(self, bConfirmQuit=True, bShowBanner=True)
| 1180 | # ------------------------------------------------------------------------------ |
| 1181 | |
| 1182 | def interactive(self, bConfirmQuit=True, bShowBanner=True): |
| 1183 | """ |
| 1184 | Start an interactive debugging session. |
| 1185 | |
| 1186 | @type bConfirmQuit: bool |
| 1187 | @param bConfirmQuit: Set to C{True} to ask the user for confirmation |
| 1188 | before closing the session, C{False} otherwise. |
| 1189 | |
| 1190 | @type bShowBanner: bool |
| 1191 | @param bShowBanner: Set to C{True} to show a banner before entering |
| 1192 | the session and after leaving it, C{False} otherwise. |
| 1193 | |
| 1194 | @warn: This will temporarily disable the user-defined event handler! |
| 1195 | |
| 1196 | This method returns when the user closes the session. |
| 1197 | """ |
| 1198 | print("") |
| 1199 | print("-" * 79) |
| 1200 | print("Interactive debugging session started.") |
| 1201 | print('Use the "help" command to list all available commands.') |
| 1202 | print('Use the "quit" command to close this session.') |
| 1203 | print("-" * 79) |
| 1204 | if self.lastEvent is None: |
| 1205 | print("") |
| 1206 | console = ConsoleDebugger() |
| 1207 | console.confirm_quit = bConfirmQuit |
| 1208 | console.load_history() |
| 1209 | try: |
| 1210 | console.start_using_debugger(self) |
| 1211 | console.loop() |
| 1212 | finally: |
| 1213 | console.stop_using_debugger() |
| 1214 | console.save_history() |
| 1215 | print("") |
| 1216 | print("-" * 79) |
| 1217 | print("Interactive debugging session closed.") |
| 1218 | print("-" * 79) |
| 1219 | print("") |
| 1220 | |
| 1221 | # ------------------------------------------------------------------------------ |
| 1222 |
no test coverage detected