Skip to content
Rolf Kristensen edited this page Oct 22, 2023 · 16 revisions

Writes log messages to the attached managed debugger (Ex. Visual Studio Output Window). See also System.Diagnostics.Debugger.Log

Platforms Supported: Limited (Not available for NetStandard1.3 + NetStandard1.5)

Configuration Syntax

<targets>
  <target xsi:type="Debugger"
          name="String"
          footer="Layout"
          layout="Layout"
          header="Layout" />
</targets>

Read more about using the Configuration File.

Parameters

General Options

  • name - Name of the target.

Layout Options

  • layout - Text to be rendered. Layout Required. Default: ${longdate}|${level:uppercase=true}|${logger}|${message:withexception=true}
  • header - Layout used to format header-output when initializing. Layout
  • footer - Layout used to format footer-output when closing. Layout

Examples

From stackoverflow

<targets>
  <target name="debugger" xsi:type="Debugger" layout="${logger}::${message}"/>
</targets>

<rules>
  <logger name="*" minlevel="Trace" writeTo="debugger" />
</rules>

Notes

Alternative targets for diagnostic output:

Clone this wiki locally