Package chandlerdb :: Package util :: Module debugger
[hide private]
[frames] | no frames]

Source Code for Module chandlerdb.util.debugger

 1  #   Copyright (c) 2003-2006 Open Source Applications Foundation 
 2  # 
 3  #   Licensed under the Apache License, Version 2.0 (the "License"); 
 4  #   you may not use this file except in compliance with the License. 
 5  #   You may obtain a copy of the License at 
 6  # 
 7  #       http://www.apache.org/licenses/LICENSE-2.0 
 8  # 
 9  #   Unless required by applicable law or agreed to in writing, software 
10  #   distributed under the License is distributed on an "AS IS" BASIS, 
11  #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
12  #   See the License for the specific language governing permissions and 
13  #   limitations under the License. 
14   
15   
16  import sys 
17  from pdb import Pdb 
18   
19   
20 -class debugger(Pdb):
21
22 - def __init__(self, view):
23 24 Pdb.__init__(self) 25 self.view = view
26
27 - def do_done(self, arg):
28 29 self.set_continue() 30 31 view = self.view 32 if view._debugOn: 33 view.debugOn(view._debugOn) 34 35 return 1
36 37
38 -def set_trace(view):
39 debugger(view).set_trace(sys._getframe().f_back)
40