<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.Extensibility.IDebugOutput

interface IDebugOutput
Encapsulates method call that has to be compiled with DEBUG compiler constant.
bool IsAttached()

Checks to see if debugger is attached.

bool IsLogging()

Checks to see if logging is enabled by an attached debugger.

void WriteLine(string message)

Write the message to the VisualStudio output window.