You can stop checkout success page redirection after refresh page, check below code
vendor/magento/module-checkout/Controller/Onepage/Success.php
Comment Out Line No : 22 And in Magento 2.3... Line No : 26
//$session->clearQuote();
Ex :-
public function execute()
{
$session = $this->getOnepage()->getCheckout();
if (!$this->_objectManager->get(\Magento\Checkout\Model\Session\SuccessValidator::class)->isValid()) {
return $this->resultRedirectFactory->create()->setPath('checkout/cart');
}
// $session->clearQuote(); ***** COMMENT THIS LINE *****
//@todo: Refactor it to match CQRS
$resultPage = $this->resultPageFactory->create();
$this->_eventManager->dispatch(
'checkout_onepage_controller_success_action',
[
'order_ids' => [$session->getLastOrderId()],
'order' => $session->getLastRealOrder()
]
);
return $resultPage;
}
Now you can debug checkout success page.