diff --git a/src/PowerShellEditorServices.Protocol/LanguageServer/Completion.cs b/src/PowerShellEditorServices.Protocol/LanguageServer/Completion.cs index b302de838..cf0f15594 100644 --- a/src/PowerShellEditorServices.Protocol/LanguageServer/Completion.cs +++ b/src/PowerShellEditorServices.Protocol/LanguageServer/Completion.cs @@ -3,12 +3,8 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +using System.Diagnostics; using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer { @@ -48,6 +44,7 @@ public enum CompletionItemKind Reference = 18 } + [DebuggerDisplay("NewText = {NewText}, Range = {Range.Start.Line}:{Range.Start.Character} - {Range.End.Line}:{Range.End.Character}")] public class TextEdit { public Range Range { get; set; } @@ -55,6 +52,7 @@ public class TextEdit public string NewText { get; set; } } + [DebuggerDisplay("Kind = {Kind.ToString()}, Label = {Label}, Detail = {Detail}")] public class CompletionItem { public string Label { get; set; } diff --git a/src/PowerShellEditorServices.Protocol/LanguageServer/TextDocument.cs b/src/PowerShellEditorServices.Protocol/LanguageServer/TextDocument.cs index ad4156c42..fd2ee358d 100644 --- a/src/PowerShellEditorServices.Protocol/LanguageServer/TextDocument.cs +++ b/src/PowerShellEditorServices.Protocol/LanguageServer/TextDocument.cs @@ -3,6 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +using System.Diagnostics; using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer @@ -10,6 +11,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer /// /// Defines a base parameter class for identifying a text document. /// + [DebuggerDisplay("TextDocumentIdentifier = {Uri}")] public class TextDocumentIdentifier { /// @@ -22,6 +24,7 @@ public class TextDocumentIdentifier /// /// Defines a position in a text document. /// + [DebuggerDisplay("TextDocumentPosition = {Position.Line}:{Position.Character}")] public class TextDocumentPosition : TextDocumentIdentifier { /// @@ -85,6 +88,7 @@ public class TextDocumentChangeEvent public string Text { get; set; } } + [DebuggerDisplay("Position = {Line}:{Character}")] public class Position { /// @@ -98,6 +102,7 @@ public class Position public int Character { get; set; } } + [DebuggerDisplay("Start = {Start.Line}:{Start.Character}, End = {End.Line}:{End.Character}")] public struct Range { /// @@ -111,6 +116,7 @@ public struct Range public Position End { get; set; } } + [DebuggerDisplay("Range = {Range.Start.Line}:{Range.Start.Character} - {Range.End.Line}:{Range.End.Character}, Uri = {Uri}")] public class Location { /// diff --git a/src/PowerShellEditorServices.Protocol/MessageProtocol/Message.cs b/src/PowerShellEditorServices.Protocol/MessageProtocol/Message.cs index eb1fd3db9..0d304cc03 100644 --- a/src/PowerShellEditorServices.Protocol/MessageProtocol/Message.cs +++ b/src/PowerShellEditorServices.Protocol/MessageProtocol/Message.cs @@ -3,6 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +using System.Diagnostics; using Newtonsoft.Json.Linq; namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol @@ -21,6 +22,7 @@ public enum MessageType /// /// Provides common details for protocol messages of any format. /// + [DebuggerDisplay("MessageType = {MessageType.ToString()}, Method = {Method}, Id = {Id}")] public class Message { /// diff --git a/src/PowerShellEditorServices.Protocol/MessageProtocol/RequestType.cs b/src/PowerShellEditorServices.Protocol/MessageProtocol/RequestType.cs index 8391e647f..e5d0cea08 100644 --- a/src/PowerShellEditorServices.Protocol/MessageProtocol/RequestType.cs +++ b/src/PowerShellEditorServices.Protocol/MessageProtocol/RequestType.cs @@ -3,14 +3,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Diagnostics; namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol { + [DebuggerDisplay("RequestType MethodName = {MethodName}")] public class RequestType { public string MethodName { get; private set; } diff --git a/src/PowerShellEditorServices/Language/CompletionResults.cs b/src/PowerShellEditorServices/Language/CompletionResults.cs index 00b3a6b44..9a01c2446 100644 --- a/src/PowerShellEditorServices/Language/CompletionResults.cs +++ b/src/PowerShellEditorServices/Language/CompletionResults.cs @@ -3,11 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Management.Automation; using System.Text.RegularExpressions; +using Microsoft.PowerShell.EditorServices.Utility; namespace Microsoft.PowerShell.EditorServices { @@ -135,6 +136,7 @@ public enum CompletionType /// /// Provides the details about a single completion result. /// + [DebuggerDisplay("CompletionType = {CompletionType.ToString()}, CompletionText = {CompletionText}")] public sealed class CompletionDetails { #region Properties diff --git a/src/PowerShellEditorServices/Language/SymbolDetails.cs b/src/PowerShellEditorServices/Language/SymbolDetails.cs index 203575f6a..ca6b9376b 100644 --- a/src/PowerShellEditorServices/Language/SymbolDetails.cs +++ b/src/PowerShellEditorServices/Language/SymbolDetails.cs @@ -3,16 +3,16 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System.Linq; +using System.Diagnostics; +using System.Management.Automation; +using System.Management.Automation.Runspaces; namespace Microsoft.PowerShell.EditorServices { - using System.Management.Automation; - using System.Management.Automation.Runspaces; - /// /// Provides detailed information for a given symbol. /// + [DebuggerDisplay("SymbolReference = {SymbolReference.SymbolType}/{SymbolReference.SymbolName}, DisplayString = {DisplayString}")] public class SymbolDetails { #region Properties diff --git a/src/PowerShellEditorServices/Language/SymbolReference.cs b/src/PowerShellEditorServices/Language/SymbolReference.cs index a867b0896..ed3f6af01 100644 --- a/src/PowerShellEditorServices/Language/SymbolReference.cs +++ b/src/PowerShellEditorServices/Language/SymbolReference.cs @@ -3,6 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // +using System.Diagnostics; using System.Management.Automation.Language; namespace Microsoft.PowerShell.EditorServices @@ -10,6 +11,7 @@ namespace Microsoft.PowerShell.EditorServices /// /// A class that holds the type, name, script extent, and source line of a symbol /// + [DebuggerDisplay("SymbolType = {SymbolType}, SymbolName = {SymbolName}")] public class SymbolReference { #region Properties