I see, the ext_qp_res option is not interfaced in the code generation part.
Since you seem to use the generated solver.
I would like to point you to the get_residuals function in the Python interface:
The calls to the C functions in there can be used with SQP_RTI in the code generated solver, namely evaluating the residuals, which is not done by default in RTI for performance, and then calling the getters.
I am not sure in what framework you are using the code generated solver.
If in C++, ROS or the like you can just make those calls to the shared library.
It would of course be nice to also add this functionality to the Matlab interface.