共用方式為


IVsDebugger2.ShowSource Method

Displays a source file in the IDE. Takes as arguments a pointer to an IUnknown interface that can be queried for IDebugDocumentContext2 and display options.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

'宣告
Function ShowSource ( _
    pUnkDebugDocContext As Object, _
    fMakeActive As Integer, _
    fAlwaysMoveCaret As Integer, _
    fPromptToFindSource As Integer, _
    fIgnoreIfNotFound As Integer, _
    <OutAttribute> ByRef ppTextView As IVsTextView _
) As Integer
'用途
Dim instance As IVsDebugger2
Dim pUnkDebugDocContext As Object
Dim fMakeActive As Integer
Dim fAlwaysMoveCaret As Integer
Dim fPromptToFindSource As Integer
Dim fIgnoreIfNotFound As Integer
Dim ppTextView As IVsTextView
Dim returnValue As Integer

returnValue = instance.ShowSource(pUnkDebugDocContext, _
    fMakeActive, fAlwaysMoveCaret, fPromptToFindSource, _
    fIgnoreIfNotFound, ppTextView)
int ShowSource(
    Object pUnkDebugDocContext,
    int fMakeActive,
    int fAlwaysMoveCaret,
    int fPromptToFindSource,
    int fIgnoreIfNotFound,
    out IVsTextView ppTextView
)
int ShowSource(
    [InAttribute] Object^ pUnkDebugDocContext, 
    [InAttribute] int fMakeActive, 
    [InAttribute] int fAlwaysMoveCaret, 
    [InAttribute] int fPromptToFindSource, 
    [InAttribute] int fIgnoreIfNotFound, 
    [OutAttribute] IVsTextView^% ppTextView
)
abstract ShowSource : 
        pUnkDebugDocContext:Object * 
        fMakeActive:int * 
        fAlwaysMoveCaret:int * 
        fPromptToFindSource:int * 
        fIgnoreIfNotFound:int * 
        ppTextView:IVsTextView byref -> int 
function ShowSource(
    pUnkDebugDocContext : Object, 
    fMakeActive : int, 
    fAlwaysMoveCaret : int, 
    fPromptToFindSource : int, 
    fIgnoreIfNotFound : int, 
    ppTextView : IVsTextView
) : int

Parameters

  • fMakeActive
    Type: System.Int32
    [in] Boolean. If true, makes the source file window the active window.
  • fPromptToFindSource
    Type: System.Int32
    [in] Boolean. If true, prompt the user if the file is not found.
  • fIgnoreIfNotFound
    Type: System.Int32
    [in] Boolean. If true, do not try to find the file in the future if it is not found now.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From 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 Security

See Also

Reference

IVsDebugger2 Interface

IVsDebugger2 Members

Microsoft.VisualStudio.Shell.Interop Namespace