The DETACH_SESSION stored procedure stops debugging the target program.
You can call this procedure at any time, but it does not notify the target session that the debug session is detaching itself, and it does not end the execution of the target session. Therefore, you must make sure that the target session does not hang itself.
Syntax
DBMS_DEBUG.DETACH_SESSION;