This version of Unity is unsupported.

ManagedDebugger.isAttached

public static bool isAttached;

Description

Returns true if there is a managed debugger attached to the UnityEditor, or false if there is not.