Compartir a través de


Debugger2.Languages Property

Gets a list of languages that the debugger supports.

Namespace:  EnvDTE80
Assembly:  EnvDTE80 (in EnvDTE80.dll)

Syntax

'Declaration
ReadOnly Property Languages As Languages
Languages Languages { get; }
property Languages^ Languages {
    Languages^ get ();
}
abstract Languages : Languages with get
function get Languages () : Languages

Property Value

Type: EnvDTE.Languages
A Languages collection.

Remarks

Languages gets a Languages collection containing a list of languages that the debugger supports. This list is dictated by the version of Visual Studio and the installed language add-ons.

Examples

The following example demonstrates how to use the Languages property.

To test this property, open the target project and run the add-in.

public static void Languages(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("Languages Test");
    owp.Activate();

    EnvDTE80.Debugger2 debugger = (EnvDTE80.Debugger2)dte.Debugger;
    foreach (EnvDTE.Language lang in debugger.Languages)
        owp.OutputString(lang.Name + "\n");
}
Sub SupportedLanguages()
    Dim ow As OutputWindow
    ow = DTE2.Windows.Item(Constants.vsWindowKindOutput).Object

    ow.ActivePane.OutputString("Debugger supports the following _
    languages:" + vbCrLf)

    Dim lang As Language
    For Each lang In DTE2.Debugger.Languages
        ow.ActivePane.OutputString(lang.Name + vbCrLf)
    Next
End Sub

.NET Framework Security

See Also

Reference

Debugger2 Interface

EnvDTE80 Namespace