You could set an window close event breakpoint. This way the debugger stops the window (popup) from closing.
devtools -> scripts (or sources) -> event listener breakpoints -> Window -> close

Link to Chromium rfc
You could set an window close event breakpoint. This way the debugger stops the window (popup) from closing.
devtools -> scripts (or sources) -> event listener breakpoints -> Window -> close

Link to Chromium rfc