  Current-biased Josephson junctions can act as detectors of electromagnetic
radiation. At optimal conditions, their sensitivity is limited by fluctuations
causing stochastic switching from the superconducting to the resistive state.
This work provides a quantitative description of a stochastic switching current
detector, based on an underdamped Josephson junction. It is shown that
activation of a Josephson plasma resonance can greatly enhance the detector
responsivity in proportion to the quality factor of the junction. The ways of
tuning the detector for achieving optimal operation are discussed. For
realistic parameters of Nb/AlOx/Nb tunnel junctions, the sensitivity and
noise-equivalent power can reach values of $S\simeq 2\times10^{13}$ (V/W) and
$NEP\simeq 5\times10^{-24}$ (WHz$^{-1/2}$), respectively. These outstanding
characteristics facilitate both bolometric and single-photon detection in
microwave and terahertz ranges.
