2 * Copyright 2008 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 import "activscp.idl";
21 /* import "dbgprop.idl"; */
23 interface IDebugDocumentContext;
24 interface IRemoteDebugApplication;
27 interface IEnumDebugStackFrames;
28 interface IDebugStackFrame;
29 interface IApplicationDebugger;
30 interface IEnumRemoteDebugApplicationThreads;
31 interface IDebugApplicationNode;
32 interface IEnumDebugExpressionContexts;
33 interface IDebugApplicationThread;
34 interface IDebugSyncOperation;
35 interface IDebugAsyncOperation;
36 interface IDebugStackFrameSniffer;
37 interface IDebugThreadCall32;
38 interface IActiveScriptErrorDebug;
39 interface IProvideExpressionContexts;
41 typedef enum tagBREAKPOINT_STATE {
47 typedef DWORD APPBREAKFLAGS;
49 typedef enum tagBREAKREASON {
51 BREAKREASON_BREAKPOINT,
52 BREAKREASON_DEBUGGER_BLOCK,
53 BREAKREASON_HOST_INITIATED,
54 BREAKREASON_LANGUAGE_INITIATED,
55 BREAKREASON_DEBUGGER_HALT,
60 typedef enum tagBREAKRESUME_ACTION {
61 BREAKRESUMEACTION_ABORT,
62 BREAKRESUMEACTION_CONTINUE,
63 BREAKRESUMEACTION_STEP_INTO,
64 BREAKRESUMEACTION_STEP_OVER,
65 BREAKRESUMEACTION_STEP_OUT,
66 BREAKRESUMEACTION_IGNORE
69 typedef enum tagDOCUMENTNAMETYPE {
70 DOCUMENTNAMETYPE_APPNODE,
71 DOCUMENTNAMETYPE_TITLE,
72 DOCUMENTNAMETYPE_FILE_TAIL,
76 typedef enum tagERRORRESUMEACTION {
77 ERRORRESUMEACTION_ReexecuteErrorStatement,
78 ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller,
79 ERRORRESUMEACTION_SkipErrorStatement,
82 /************************************************************
83 * interface IDebugDocumentInfo
87 uuid(51973c1f-cb0c-11d0-b5c9-00a0244a0e7a),
88 pointer_default(unique)
90 interface IDebugDocumentInfo : IUnknown
93 [in] DOCUMENTNAMETYPE dnt,
94 [out] BSTR *pbstrName);
96 HRESULT GetDocumentClassId(
97 [out] CLSID *pclsidDocument);
100 /************************************************************
101 * interface IDebugDocument
105 uuid(51973c21-cb0c-11d0-b5c9-00a0244a0e7a),
106 pointer_default(unique)
108 interface IDebugDocument : IDebugDocumentInfo
112 /************************************************************
113 * interface IDebugCodeContext
117 uuid(51973c13-cb0c-11d0-b5c9-00a0244a0e7a),
118 pointer_default(unique)
120 interface IDebugCodeContext : IUnknown
122 HRESULT GetDocumentContext(
123 [out] IDebugDocumentContext **ppsc);
125 HRESULT SetBreakPoint(
126 [in] BREAKPOINT_STATE bps);
129 /************************************************************
130 * interface IEnumDebugCodeContexts
134 uuid(51973c1d-cb0c-11d0-b5c9-00a0244a0e7a),
135 pointer_default(unique)
137 interface IEnumDebugCodeContexts : IUnknown
141 [out] IDebugCodeContext **pscc,
142 [out] ULONG *pceltFetched);
150 [out] IEnumDebugCodeContexts **ppescc);
153 /************************************************************
154 * interface IDebugDocumentContext
158 uuid(51973c28-cb0c-11d0-b5c9-00a0244a0e7a),
159 pointer_default(unique)
161 interface IDebugDocumentContext : IUnknown
164 [out] IDebugDocument **ppsd);
166 HRESULT EnumCodeContexts(
167 [out] IEnumDebugCodeContexts **ppescc);
170 /************************************************************
171 * interface IRemoteDebugApplicationThread
175 uuid(51973c37-cb0c-11d0-b5c9-00a0244a0e7a),
176 pointer_default(unique)
178 interface IRemoteDebugApplicationThread : IUnknown
180 HRESULT GetSystemThreadId(
181 [out] DWORD *dwThreadId);
183 HRESULT GetApplication(
184 [out] IRemoteDebugApplication **pprda);
186 HRESULT EnumStackFrames(
187 [out] IEnumDebugStackFrames **ppedsf);
189 HRESULT GetDescription(
190 [out] BSTR *pbstrDescription,
191 [out] BSTR *pbstrState);
193 HRESULT SetNextStatement(
194 [in] IDebugStackFrame *pStackFrame,
195 [in] IDebugCodeContext *pCodeContext);
198 [out] DWORD *pState);
201 [out] DWORD *pdwCount);
204 [out] DWORD *pdwCount);
206 HRESULT GetSuspendCount(
207 [out] DWORD *pdwCount);
210 /************************************************************
211 * interface IRemoteDebugApplication
215 uuid(51973c30-cb0c-11d0-b5c9-00a0244Aae7a),
216 pointer_default(unique)
218 interface IRemoteDebugApplication : IUnknown
220 HRESULT ResumeFromBreakPoint(
221 [in] IRemoteDebugApplicationThread *prptFocus,
222 [in] BREAKRESUMEACTION bra,
223 [in] ERRORRESUMEACTION era);
225 HRESULT CauseBreak();
227 HRESULT ConnectDebugger(
228 [in] IApplicationDebugger *pad);
230 HRESULT DisconnectDebugger();
233 [out] IApplicationDebugger **pad);
235 HRESULT CreateInstanceAtApplication(
236 [in] REFCLSID rclsid,
237 [in] IUnknown *pUnkOuter,
238 [in] DWORD dwClsContext,
240 [out, iid_is(riid)] IUnknown **ppvObject);
242 HRESULT QueryAlive();
245 [out] IEnumRemoteDebugApplicationThreads **pperdat);
248 [out] BSTR *pbstrName);
251 [out] IDebugApplicationNode **ppdanRoot);
253 HRESULT EnumGlobalExpressionContexts(
254 [out] IEnumDebugExpressionContexts **ppedec);
257 /************************************************************
258 * interface IDebugApplication32
262 uuid(51973c32-cb0c-11d0-b5c9-00a0244a0e7a),
263 pointer_default(unique),
266 interface IDebugApplication32 : IRemoteDebugApplication
269 [in] LPCOLESTR pstrName);
271 HRESULT StepOutComplete();
274 [in] LPCOLESTR pstr);
276 HRESULT StartDebugSession();
278 HRESULT HandleBreakPoint(
280 [out] BREAKRESUMEACTION *pbra);
284 HRESULT GetBreakFlags(
285 [out] APPBREAKFLAGS *pabf,
286 [out] IRemoteDebugApplicationThread **pprdatSteppingThread);
288 HRESULT GetCurrentThread(
289 [out] IDebugApplicationThread **pat);
291 HRESULT CreateAsyncDebugOperation(
292 [in] IDebugSyncOperation *psdo,
293 [out] IDebugAsyncOperation **ppado);
295 HRESULT AddStackFrameSniffer(
296 [in] IDebugStackFrameSniffer *pdsfs,
297 [out] DWORD *pdwCookie);
299 HRESULT RemoveStackFrameSniffer(
300 [in] DWORD dwCookie);
302 HRESULT QueryCurrentThreadIsDebuggerThread();
304 HRESULT SynchronousCallInDebuggerThread(
305 [in] IDebugThreadCall32 *pptc,
308 [in] DWORD dwParam3);
310 HRESULT CreateApplicationNode(
311 [out] IDebugApplicationNode **ppdanNew);
313 HRESULT FireDebuggerEvent(
315 [in] IUnknown *punk);
317 HRESULT HandleRuntimeError(
318 [in] IActiveScriptErrorDebug *pErrorDebug,
319 [in] IActiveScriptSite *pScriptSite,
320 [out] BREAKRESUMEACTION *pbra,
321 [out] ERRORRESUMEACTION *perra,
322 [out] BOOL *pfCallOnScriptError);
326 BOOL FIsAutoJitDebugEnabled();
328 HRESULT AddGlobalExpressionContextProvider(
329 [in] IProvideExpressionContexts *pdsfs,
330 [out] DWORD *pdwCookie);
332 HRESULT RemoveGlobalExpressionContextProvider(
333 [in] DWORD dwCookie);
336 /************************************************************
337 * interface IActiveScriptSiteDebug32
341 uuid(51973c11-cb0c-11d0-b5c9-00a0244a0e7a),
342 pointer_default(unique),
345 interface IActiveScriptSiteDebug32 : IUnknown
347 HRESULT GetDocumentContextFromPosition(
348 [in] DWORD dwSourceContext,
349 [in] ULONG uCharacterOffset,
350 [in] ULONG uNumChars,
351 [out] IDebugDocumentContext **ppsc);
353 HRESULT GetApplication(
354 [out] IDebugApplication32 **ppda);
356 HRESULT GetRootApplicationNode(
357 [out] IDebugApplicationNode **ppdanRoot);
359 HRESULT OnScriptErrorDebug(
360 [in] IActiveScriptErrorDebug *pErrorDebug,
361 [out] BOOL *pfEnterDebugger,
362 [out] BOOL *pfCallOnScriptErrorWhenContinuing);
365 cpp_quote("#ifndef DISABLE_ACTIVDBG_INTERFACE_WRAPPERS")
366 cpp_quote("#ifdef _WIN64")
368 cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug64")
369 cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug64")
371 cpp_quote("#define IDebugApplication IDebugApplication64")
372 cpp_quote("#define IID_IDebugApplication IID_IDebugApplication64")
376 cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug32")
377 cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug32")
379 cpp_quote("#define IDebugApplication IDebugApplication32")
380 cpp_quote("#define IID_IDebugApplication IID_IDebugApplication32")