  A scalar-tensor theory of gravity is considered wherein the gravitational
coupling $G$ and the speed of light $c$ are admitted as space-time functions
and combine to form the definition of the scalar field $\phi$. The varying $c$
participates in the definition of the variation of the matter part of the
action; it is related to the effective stress-energy tensor which is a result
of the requirement of symmetry under general coordinate transformations. The
effect of the cosmological coupling $\Lambda$ is accommodated within a possible
behaviour of $\phi$. We analyze the dynamics of $\phi$ in the phase space,
thereby showing the existence of an attractor point for reasonable hypotheses
on the potential $V(\phi)$ and no particular assumption on the Hubble function.
The phase space analysis is performed both with the linear stability theory and
via the more general Lyapunov's method. Either method lead to the conclusion
that the condition $\dot{G}/G=\sigma\left(\dot{c}/c\right)$ where $\sigma=3$
must hold for the rest of cosmic evolution after the system gets to the
globally asymptotically stable fixed point and the dynamics of $\phi$ ceases.
This result provides a physical foundation for the phenomenological model
admitting $\left(G/G_{0}\right)=\left(c/c_{0}\right)^{3}$ used recently to
interpret cosmological and astrophysical data. The thus co-varying couplings
$G$ and $c$ impact the cosmic evolution after the dynamical system settles to
equilibrium. This impact is investigated by constructing the generalized
continuity equation in our scalar-tensor model and considering two possible
regimes for the varying speed of light -- decreasing $c(a)$ and increasing
$c(a)$ -- while solving our modified Friedmann equations. The solutions to the
latter equations make room for radiation- and matter-dominated eras that
progress to a dark-energy-type of accelerated expansion.
