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