24 def initDebugger(kind="standard"): |
24 def initDebugger(kind="standard"): |
25 """ |
25 """ |
26 Module function to initialize a debugger for remote debugging. |
26 Module function to initialize a debugger for remote debugging. |
27 |
27 |
28 @param kind type of debugger ("standard" or "threads") |
28 @param kind type of debugger ("standard" or "threads") |
29 @return flag indicating success (boolean) |
29 @type str |
|
30 @return flag indicating success |
|
31 @rtype bool |
30 @exception ValueError raised to indicate a wrong debugger kind |
32 @exception ValueError raised to indicate a wrong debugger kind |
31 """ |
33 """ |
32 global debugger |
34 global debugger |
|
35 |
33 res = True |
36 res = True |
34 try: |
37 try: |
35 if kind == "standard": |
38 if kind == "standard": |
36 import DebugClient # __IGNORE_WARNING_I10__ |
39 import DebugClient # __IGNORE_WARNING_I10__ |
37 |
40 |
47 |
50 |
48 def runcall(func, *args): |
51 def runcall(func, *args): |
49 """ |
52 """ |
50 Module function mimicing the Pdb interface. |
53 Module function mimicing the Pdb interface. |
51 |
54 |
52 @param func function to be called (function object) |
55 @param func function to be called |
|
56 @type function |
53 @param *args arguments being passed to func |
57 @param *args arguments being passed to func |
|
58 @type list of Any |
54 @return the function result |
59 @return the function result |
|
60 @rtype Any |
55 """ |
61 """ |
56 global debugger, __scriptname |
62 global debugger, __scriptname |
57 return debugger.run_call(__scriptname, func, *args) |
63 return debugger.run_call(__scriptname, func, *args) |
58 |
64 |
59 |
65 |
60 def setScriptname(name): |
66 def setScriptname(name): |
61 """ |
67 """ |
62 Module function to set the scriptname to be reported back to the IDE. |
68 Module function to set the script name to be reported back to the IDE. |
63 |
69 |
64 @param name absolute pathname of the script (string) |
70 @param name absolute path name of the script |
|
71 @type str |
65 """ |
72 """ |
66 global __scriptname |
73 global __scriptname |
67 __scriptname = name |
74 __scriptname = name |
68 |
75 |
69 |
76 |
70 def startDebugger(enableTrace=True, exceptions=True, tracePython=False, redirect=True): |
77 def startDebugger(enableTrace=True, exceptions=True, tracePython=False, redirect=True): |
71 """ |
78 """ |
72 Module function used to start the remote debugger. |
79 Module function used to start the remote debugger. |
73 |
80 |
74 @param enableTrace flag to enable the tracing function (boolean) |
81 @param enableTrace flag to enable the tracing function |
|
82 @type bool |
75 @param exceptions flag to enable exception reporting of the IDE |
83 @param exceptions flag to enable exception reporting of the IDE |
76 (boolean) |
84 @type bool |
77 @param tracePython flag to enable tracing into the Python library |
85 @param tracePython flag to enable tracing into the Python library |
78 (boolean) |
86 @type bool |
79 @param redirect flag indicating redirection of stdin, stdout and |
87 @param redirect flag indicating redirection of stdin, stdout and stderr |
80 stderr (boolean) |
88 @type bool |
81 """ |
89 """ |
82 global debugger |
90 global debugger |
83 if debugger: |
91 if debugger: |
84 debugger.startDebugger( |
92 debugger.startDebugger( |
85 enableTrace=enableTrace, |
93 enableTrace=enableTrace, |