Blocking debugging is easy, just have 2 processes running and have them ptrace each other. Then have the processes do a handshake every so often. The handshake has to include some proof of life. If a handshake is missed the process aborts. The beauty of this approach is that the 2 processes can do the handshake by ptrace, there doesn't need to be an external message.
A limitation in the kernel is that only 1 process can attach to another process.