apt-get source -t jessie dpkg
is one way to go:
To quote the relevant sections from the manpage
Source packages are tracked separately from binary packages via
deb-src lines in the sources.list(5) file. This means that you will
need to add such a line for each repository you want to get sources
from; otherwise you will probably get either the wrong (too old/too
new) source versions or none at all.
And also:
-t, --target-release, --default-release
This option controls the default input to the policy engine; it
creates a default pin at priority 990 using the specified release
string. This overrides the general settings in
/etc/apt/preferences. Specifically pinned packages are not affected
by the value of this option. In short, this option lets you have
simple control over which distribution packages will be retrieved
from. Some common examples might be -t '2.1*', -t unstable or -t
sid. Configuration Item: APT::Default-Release; see also the
apt_preferences(5) manual page.
Another option is to use debootstrap
and create a complete chroot.
Do not forget to use stuff like pbuilder
to have reliable builds of your package.