# Tips for debugging
Co-simulations can be tricky to debug. Here are some tips to debugging a co-simulation.
- Always print current time granted.
 - Use 
h.HELICS_FLAG_TERMINATE_ON_ERRORflag for all federates. - Check 
HELICS_FEDERATE_STATEto ensure that the federate is doing what you expect it to. - Set 
HELICS_LOG_LEVELSto show all messages. - Sometimes force quiting a co-simulation is necessary. You may need to use 
killall python,kill -9 $pid,kill %1.