xref: /AOO41X/main/udkapi/com/sun/star/script/XDebugging.idl (revision 408a4873fc8bcc602c90ea4598886bb71abf0675)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_script_XDebugging_idl__
24#define __com_sun_star_script_XDebugging_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_script_ContextInformation_idl__
31#include <com/sun/star/script/ContextInformation.idl>
32#endif
33
34
35//=============================================================================
36
37 module com {  module sun {  module star {  module script {
38
39//=============================================================================
40
41// DocMerge from xml: interface com::sun::star::script::XDebugging
42/** makes it possible to set breakpoints in an interpreter.
43    @deprecated
44 */
45published interface XDebugging: com::sun::star::uno::XInterface
46{
47    //-------------------------------------------------------------------------
48    /** returns the source code line where the breakpoint was set.
49
50                <p>The value can differ from the parameter
51                <var>nSourceCodeLine</var> when this is not a valid line to
52                place it.  -1 indicates that the breakpoint cannot be set at
53                this position.
54     */
55    long setBreakPoint( [in] string aModuleName,
56             [in] long nSourceCodeLine,
57             [in] boolean bOn );
58
59    //-------------------------------------------------------------------------
60    /** clears all breakpoints in the module set by "setBreakPoint".
61     */
62    void clearAllBreakPoints( [in] string aModuleName );
63
64    //-------------------------------------------------------------------------
65    /** Evaluates an expression.
66
67        @returns the value of the expression as string.
68
69        @param CallStackPos Position in the call stack for which the expression
70                    should be evaluated. 0 is the top/actual position in the call
71                    in the call stack, 1 the next and so on.
72     */
73    string eval( [in] string aSourceCode,
74             [in] short nCallStackPos );
75
76    //-------------------------------------------------------------------------
77    /** Returns the engine's stack trace of the current execute position. Line break is the delimiter.
78     */
79    sequence<string> getStackTrace();
80
81    //-------------------------------------------------------------------------
82    /** returns more detailed information about a specified stack frame.
83
84         @param nCallStackPos
85                specifies the position in the call stack for the
86                variables that should be delivered.
87     */
88    com::sun::star::script::ContextInformation getContextInformation( [in] short nCallStackPos );
89
90    //-------------------------------------------------------------------------
91    /** returns the value of the variable at the given stack position.
92     */
93    string dumpVariable( [in] string aVariableName,
94             [in] short nCallStackPos );
95
96    //-------------------------------------------------------------------------
97    /** sets the value of the specified variable within the specified
98        stack frame.
99     */
100    void setVariable( [in] string aVariableName,
101             [in] string aValue,
102             [in] short nCallStackPos );
103
104    //-------------------------------------------------------------------------
105    /** returns whether the given variable exists within the specified stack frame.
106     */
107    boolean isVariable( [in] string aVariableName,
108             [in] short nCallStackPos );
109
110    //-------------------------------------------------------------------------
111    /** stops the execution of the interpreter.
112
113        <p>To continue with the execution, call <method>XDebugging::doContinue</method>.
114     */
115    void stop();
116
117    //-------------------------------------------------------------------------
118    /** executes the next and only the next statement.
119
120        <p>If the next statement is a function call, the function is
121        executed completely.</p>
122     */
123    void stepOver();
124
125    //-------------------------------------------------------------------------
126    /** executes the next and only the next statement.
127
128        <p>If the next statement is a function call, only the function
129        entered.</p>
130     */
131    void stepIn();
132
133    //-------------------------------------------------------------------------
134    /** executes the program until the next return from this stack frame.
135     */
136    void stepOut();
137
138    //-------------------------------------------------------------------------
139    /** continues the program execution.
140     */
141    void doContinue();
142
143};
144
145//=============================================================================
146
147}; }; }; };
148
149#endif
150