Debug
Runtime
The standard library can swap out the debug package depending on the runtime. If debugging is disabled all the methods become static no-ops and the compiler will remove all debugging logic.
Break
Calling debug.Break() will cause the program to break. And this can be wrapped in an if.
Socket
I'll have to dig into this, but the debugger will expose itself on a socket. Tools can connect on that socket. Out of the box there should be a command line version and web version.