IVsDebugger2.ShowSource 方法

在 IDE 中显示一个源文件。采用作为参数传递指向可用于 IDebugDocumentContext2 和显示选项要查询的 IUnknown 接口。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop.8.0(在 Microsoft.VisualStudio.Shell.Interop.8.0.dll 中)

语法

声明
Function ShowSource ( _
    pUnkDebugDocContext As Object, _
    fMakeActive As Integer, _
    fAlwaysMoveCaret As Integer, _
    fPromptToFindSource As Integer, _
    fIgnoreIfNotFound As Integer, _
    <OutAttribute> ByRef ppTextView As IVsTextView _
) As Integer
int ShowSource(
    Object pUnkDebugDocContext,
    int fMakeActive,
    int fAlwaysMoveCaret,
    int fPromptToFindSource,
    int fIgnoreIfNotFound,
    out IVsTextView ppTextView
)

参数

  • pUnkDebugDocContext
    类型:System.Object
    [in] 对一 IUnknown 接口的指针在实现 IDebugDocumentContext2 的对象。
  • fMakeActive
    类型:System.Int32
    [in] 布尔值。如果 true,使源文件窗口活动窗口。
  • fAlwaysMoveCaret
    类型:System.Int32
    [in] 布尔值。如果 true,将脱字号移至文档上下文表示的该位置。 IDebugDocumentContext2:: IDebugDocumentContext2 接口的 GetStatementRange 方法。
  • fPromptToFindSource
    类型:System.Int32
    [in] 布尔值。如果 true,提示用户,如果未找到该文件。
  • fIgnoreIfNotFound
    类型:System.Int32
    [in] 布尔值。如果 true,不会在将来查找文件,如果现在未找到。

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell80.idl:

HRESULT IVsDebugger2::ShowSource(
   [in] IUnknown *pUnkDebugDocContext,
   [in] BOOL fMakeActive,
   [in] BOOL fAlwaysMoveCaret,
   [in] BOOL fPromptToFindSource,
   [in] BOOL fIgnoreIfNotFound,
   [out] IVsTextView **ppTextView
);

.NET Framework 安全性

请参见

参考

IVsDebugger2 接口

Microsoft.VisualStudio.Shell.Interop 命名空间