2.2.2.22 DEBUG_RECORD Message
The Data field of a PSRP message specifies a DEBUG_RECORD message when the MessageType field has a value of 0x00041007.
In messages of this type, the Data field is UTF-8 encoded XML, equivalent to the XML created by serializing the InformationalRecord (section 2.2.3.16), which SHOULD have the following type names:
System.Management.Automation.DebugRecord
System.Management.Automation.InformationalRecord
System.Object
Example:
-
<Obj RefId="0"> <TN RefId="0"> <T>System.Management.Automation.DebugRecord</T> <T>System.Management.Automation.InformationalRecord</T> <T>System.Object</T> </TN> <ToString>Debug message</ToString> <MS> <S N="InformationalRecord_Message">Debug message</S> <B N="InformationalRecord_SerializeInvocationInfo">true</B> <Obj N="InvocationInfo_BoundParameters" RefId="1"> <TN RefId="1"> <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</T> <T>System.Object</T> </TN> <DCT> <En> <S N="Key">Debug</S> <Obj N="Value" RefId="2"> <TN RefId="2"> <T>System.Management.Automation.SwitchParameter</T> <T>System.ValueType</T> <T>System.Object</T> </TN> <ToString>True</ToString> <Props> <B N="IsPresent">true</B> </Props> </Obj> </En> <En> <S N="Key">Message</S> <S N="Value">Debug message</S> </En> </DCT> </Obj> <Obj N="InvocationInfo_CommandOrigin" RefId="3"> <TN RefId="3"> <T>System.Management.Automation.CommandOrigin</T> <T>System.Enum</T> <T>System.ValueType</T> <T>System.Object</T> </TN> <ToString>Runspace</ToString> <I32>0</I32> </Obj> <B N="InvocationInfo_ExpectingInput">false</B> <S N="InvocationInfo_InvocationName">write-debug</S> <S N="InvocationInfo_Line"></S> <I32 N="InvocationInfo_OffsetInLine">0</I32> <Obj N="InvocationInfo_PipelineIterationInfo" RefId="4"> <TN RefId="4"> <T>System.Int32[]</T> <T>System.Array</T> <T>System.Object</T> </TN> <LST> <I32>0</I32> <I32>1</I32> </LST> </Obj> <I32 N="InvocationInfo_PipelineLength">1</I32> <I32 N="InvocationInfo_PipelinePosition">1</I32> <S N="InvocationInfo_PositionMessage"></S> <I32 N="InvocationInfo_ScriptLineNumber">0</I32> <S N="InvocationInfo_ScriptName"></S> <Obj N="InvocationInfo_UnboundArguments" RefId="5"> <TN RefId="5"> <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</T> <T>System.Object</T> </TN> <LST /> </Obj> <Obj N="CommandInfo_CommandType" RefId="6"> <TN RefId="6"> <T>System.Management.Automation.CommandTypes</T> <T>System.Enum</T> <T>System.ValueType</T> <T>System.Object</T> </TN> <ToString>Cmdlet</ToString> <I32>8</I32> </Obj> <S N="CommandInfo_Definition">Write-Debug [-Message] <String> [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-WarningAction <ActionPreference>] [-ErrorVariable <String>] [-WarningVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]_x000D__x000A_</S> <S N="CommandInfo_Name">Write-Debug</S> <Obj N="CommandInfo_Visibility" RefId="7"> <TN RefId="7"> <T>System.Management.Automation.SessionStateEntryVisibility</T> <T>System.Enum</T> <T>System.ValueType</T> <T>System.Object</T> </TN> <ToString>Public</ToString> <I32>0</I32> </Obj> <Obj N="InformationalRecord_PipelineIterationInfo" RefId="8"> <TN RefId="8"> <T>System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</T> <T>System.Object</T> </TN> <LST> <I32>0</I32> <I32>1</I32> </LST> </Obj> </MS> </Obj>