Simple debugging loop. This debugging loop is meant to be useful for most simple scripts. It iterates as long as there is at least one debugee, or an exception is raised. Multiple calls are allowed. This is a trivial example script:: import sys
(self)
| 1076 | self.cont() |
| 1077 | |
| 1078 | def loop(self): |
| 1079 | """ |
| 1080 | Simple debugging loop. |
| 1081 | |
| 1082 | This debugging loop is meant to be useful for most simple scripts. |
| 1083 | It iterates as long as there is at least one debugee, or an exception |
| 1084 | is raised. Multiple calls are allowed. |
| 1085 | |
| 1086 | This is a trivial example script:: |
| 1087 | import sys |
| 1088 | debug = Debug() |
| 1089 | try: |
| 1090 | debug.execv( sys.argv [ 1 : ] ) |
| 1091 | debug.loop() |
| 1092 | finally: |
| 1093 | debug.stop() |
| 1094 | |
| 1095 | @see: L{next}, L{stop} |
| 1096 | |
| 1097 | U{http://msdn.microsoft.com/en-us/library/ms681675(VS.85).aspx} |
| 1098 | |
| 1099 | @raise WindowsError: Raises an exception on error. |
| 1100 | |
| 1101 | If the wait operation causes an error, debugging is stopped |
| 1102 | (meaning all debugees are either killed or detached from). |
| 1103 | |
| 1104 | If the event dispatching causes an error, the event is still |
| 1105 | continued before returning. This may happen, for example, if the |
| 1106 | event handler raises an exception nobody catches. |
| 1107 | """ |
| 1108 | while self: |
| 1109 | self.next() |
| 1110 | |
| 1111 | def get_debugee_count(self): |
| 1112 | """ |