In rider, how to listen debug session pause in breakpoint event
已回答
in some case, when debug unity, rider debug session pause in breakpoint will not activate rider window, i must manually activate rider window
so I hope a way to listen debug session paused, when pause > activate rider
I know openapi has `DebugProcessListener` but in rider.jar, this class doesn't exist, how to do
请先登录再写评论。
I find the solution, use `XDebugSessionListener` like following
static XDebugSessionListener sessionListener = new XDebugSessionListener() {
@Override
void sessionPaused() {
println("debug session is paused")
}
}
void msAttachToUnityEditor(Closure c) {
def c2 = {
def dm = XDebuggerManagerImpl.getInstance(pj);
// remove exist listener
dm.getCurrentSession().removeSessionListener(sessionListener)
dm.getCurrentSession().addSessionListener(sessionListener)
c.call()
}
if session is not found, I can use
to first wait session start and then run my code