  The physics of magnetic fields ($\textbf{B}$) and cosmic rays (CRs) have
recently been included in simulations of galaxy formation. However, significant
uncertainties remain in how these components affect galaxy evolution. To
understand their common observational tracers, we analyze the magnetic fields
in a set of high-resolution, magneto-hydrodynamic, cosmological simulations of
Milky-Way-like galaxies from the FIRE-2 project. We compare mock observables of
magnetic field tracers for simulations with and without CRs to observations of
Zeeman splitting and rotation/dispersion measures. We find reasonable agreement
between simulations and observations in both the neutral and the ionised
interstellar medium (ISM). We find that the simulated galaxies with CRs show
weaker ISM $|\textbf{B}|$ fields on average compared to their
magnetic-field-only counterparts. This is a manifestation of the effects of CRs
in the diffuse, low density inner circum-galactic medium (CGM). We find that
equipartition between magnetic and cosmic ray energy densities may be valid at
large ($>$ 1 kpc) scales for typical ISM densities of Milky-Way-like galaxies,
but not in their halos. Within the ISM, the magnetic fields in our simulated
galaxies follow a power-law scaling with gas density. The scaling extends down
to hydrogen number densities $<$ 300 cm$^{-3}$, in contrast to
observationally-derived models, but consistent with the observational
measurements. Finally, we generate synthetic rotation measure (RM) profiles for
projections of the simulated galaxies and compare to observational constraints
in the CGM. While consistent with upper limits, improved data are needed to
detect the predicted CGM RMs at 10-200 kpc and better constrain theoretical
predictions.
