File: BoaDebugServer.py

package info (click to toggle)
boa-constructor 0.3.0-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,188 kB
  • ctags: 8,857
  • sloc: python: 54,163; sh: 66; makefile: 36
file content (21 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import sys

# don't trace this module
__traceable__ = 0

def StartDebugServer():
    sys.path.append('c:/Path/To/Boa')

    from Debugger.RemoteServer import start
    start('', '') # username, password

    return 'Debug Server started, attach to it from the IDE.'

def HookDebugServer():
    if hasattr(sys, 'debugger_control'):
        sys.debugger_control.set_traceable()
        sys.debugger_control.set_continue()
    else:
        raise Exception('Not running in the debugger.')

    return 'Debug Server hooked, breakpoints now active.'