I think the options below are as close as you are going to get.
help cvx_solver_settings
…
cvx_solver_settings( ‘dumpfile’, ) is a setting supported by
all solvers. If set, it will save a .MAT file containing the exact
input arguments delivered to the solver. This file will be created
immediately before the solver is called, so you will be able to examine
their contents even if the solver fails with an error. This feature is
to be used primarily by solver developers.
…
Whether that will suit your needs for Gurobi is for you to determine.
Note that you can use cvx_solver_settings
to set Gurobi options accessible from its MATLAB interface.
If Mosek is specified as the solver, you can save the Mosek task file with
cvx_solver_settings('write', 'dump.task.gz')