20 ericpath = os.getenv('ERICDIR', getConfig('ericDir')) |
20 ericpath = os.getenv('ERICDIR', getConfig('ericDir')) |
21 |
21 |
22 if not ericpath in sys.path: |
22 if not ericpath in sys.path: |
23 sys.path.insert(-1, ericpath) |
23 sys.path.insert(-1, ericpath) |
24 |
24 |
25 def initDebugger(kind = "standard"): |
25 |
|
26 def initDebugger(kind="standard"): |
26 """ |
27 """ |
27 Module function to initialize a debugger for remote debugging. |
28 Module function to initialize a debugger for remote debugging. |
28 |
29 |
29 @param kind type of debugger ("standard" or "threads") |
30 @param kind type of debugger ("standard" or "threads") |
30 @return flag indicating success (boolean) |
31 @return flag indicating success (boolean) |
55 @return the function result |
57 @return the function result |
56 """ |
58 """ |
57 global debugger, __scriptname |
59 global debugger, __scriptname |
58 return debugger.run_call(__scriptname, func, *args) |
60 return debugger.run_call(__scriptname, func, *args) |
59 |
61 |
|
62 |
60 def setScriptname(name): |
63 def setScriptname(name): |
61 """ |
64 """ |
62 Module function to set the scriptname to be reported back to the IDE. |
65 Module function to set the scriptname to be reported back to the IDE. |
63 |
66 |
64 @param name absolute pathname of the script (string) |
67 @param name absolute pathname of the script (string) |
65 """ |
68 """ |
66 global __scriptname |
69 global __scriptname |
67 __scriptname = name |
70 __scriptname = name |
68 |
71 |
69 def startDebugger(enableTrace = True, exceptions = True, |
72 |
70 tracePython = False, redirect = True): |
73 def startDebugger(enableTrace=True, exceptions=True, |
|
74 tracePython=False, redirect=True): |
71 """ |
75 """ |
72 Module function used to start the remote debugger. |
76 Module function used to start the remote debugger. |
73 |
77 |
74 @keyparam enableTrace flag to enable the tracing function (boolean) |
78 @keyparam enableTrace flag to enable the tracing function (boolean) |
75 @keyparam exceptions flag to enable exception reporting of the IDE (boolean) |
79 @keyparam exceptions flag to enable exception reporting of the IDE (boolean) |
76 @keyparam tracePython flag to enable tracing into the Python library (boolean) |
80 @keyparam tracePython flag to enable tracing into the Python library (boolean) |
77 @keyparam redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
81 @keyparam redirect flag indicating redirection of stdin, stdout and stderr (boolean) |
78 """ |
82 """ |
79 global debugger |
83 global debugger |
80 if debugger: |
84 if debugger: |
81 debugger.startDebugger(enableTrace = enableTrace, exceptions = exceptions, |
85 debugger.startDebugger(enableTrace=enableTrace, exceptions=exceptions, |
82 tracePython = tracePython, redirect = redirect) |
86 tracePython=tracePython, redirect=redirect) |