Breakpoint2.FileColumn 属性

定义

获取设置断点的字符位置(在文件中的某一行内)。

public:
 property int FileColumn { int get(); };
public:
 property int FileColumn { int get(); };
[System.Runtime.InteropServices.DispId(107)]
public int FileColumn { [System.Runtime.InteropServices.DispId(107)] get; }
[<System.Runtime.InteropServices.DispId(107)>]
[<get: System.Runtime.InteropServices.DispId(107)>]
member this.FileColumn : int
Public ReadOnly Property FileColumn As Integer

属性值

Int32

包含字符位置的整数。

实现

属性

示例

下面的示例演示如何使用 FileColumn 属性。

public static void FileColumn(EnvDTE80.DTE2 dte)  
{  
    // Setup debug Output window.  
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);  
    w.Visible = true;  
    OutputWindow ow = (OutputWindow)w.Object;  
    OutputWindowPane owp = ow.OutputWindowPanes.Add("FileColumn property: ");  
    owp.Activate();  

    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;  
    owp.OutputString("Breakpoint in the file " + debugger.Breakpoints.Item(1).File);  
    owp.OutputString(" on line " +  
                     debugger.Breakpoints.Item(1).FileLine.ToString() + " column ");  
    owp.OutputString(debugger.Breakpoints.Item(1).FileColumn.ToString() + " is ");  
    owp.OutputString(debugger.Breakpoints.Item(1).Enabled ? "enabled." : "disabled.");  
    owp.OutputString("\nThis breakpoint is in the function: " +  
                     debugger.Breakpoints.Item(1).FunctionName);  
}  

注解

获取在设置断点的文件中的行内 (列) 的字符位置。 此值在 "文件"、"新建断点" 对话框的 "字符" 框中指定。

适用于