Jenkins can "dynamically" provide tools and configurations to jobs via config file provider plugin, global tool configuration etc.
When debugging a job however, things get painful because you usually don't have said configurations/tools available in your environment (i.e. when a user logs on to the slave).
Is there a way to store configurations that would allow someone to manually re-create the build environment of the Jenkins job? I am thinking of something like a shell script that could be sourced so you would have the
proper JDK, Maven version and settings.xml available and you could just type "mvn clean install" to debug your build.
Our developers mainly need this to debug E2E test runs.
I don't think there is any specific plugin to allow you to know how the current build environment looks like when using the configuration tools, unless you run some shell steps underneath to trap that environment setup.
IMO, docker seems to fit quite well your requirements