#PSTip How can I determine if I’m in debugging mode?
Note: This tip requires PowerShell 2.0 or above. When a session is being debugged, PowerShell populates an automatic variable called _$PSDebugContext _which contains an object that has Breakpoints and InvocationInfo properties information about the …
Read More