RStudio freezes when attempting to plot non-existing parameter

Every time I accidentally write a parameter name that doesn’t exist as the “pars” argument for plotting a fitted Stan object, RStudio freezes for about five minutes before I can do anything. That is, if I want to plot a parameter called “gamma”, but inadvertently write plot(stanfit,pars=“gamm”), RStudio tells me (correctly) “Error in check_pars(allpars, pars) : no parameter gamm” but then freezes. I get the same behavior for traceplot. Using the the “stop” function doesn’t help. The same pattern occurs on my Windows 10 computer and when running on a linux cluster.

It’s quite disruptive when e.g. debugging. Any suggestions for a solution, except consistently writing the right parameter name? That appears to be impossible.

Yeah – don’t use traceplot but rather stan_trace. I’ve had the same issue!