We report on baryon resonance production and decay in proton-proton collisions at a kinetic energy of $3.5$ GeV based on data measured with HADES. The exclusive channels $pp rightarrow nppi^{+}$ and $pp rightarrow pppi^{0}$ as well as $pp rightarrow ppe^{+}e^{-}$ are studied simultaneously for the first time. The invariant masses and angular distributions of the pion-nucleon systems were studied and compared to simulations based on a resonance model ansatz assuming saturation of the pion production by an incoherent sum of baryonic resonances (R) with masses $<2~$ GeV/$c^2$. A very good description of the one-pion production is achieved allowing for an estimate of individual baryon-resonance production-cross-sections which are used as input to calculate the dielectron yields from $Rrightarrow pe^+e^-$ decays. Two models of the resonance decays into dielectrons are examined assuming a point-like $RN gamma^*$ coupling and the dominance of the $rho$ meson. The results of model calculations are compared to data from the exclusive $ppe^{+}e^{-}$ channel by means of the dielectron and $pe^+e^-$ invariant mass distributions.