Use Docker on your machine to recreate the Travis build environment for the job, following the common-build-problems doc referenced in the thread: set up a temporary build id, pull the same image Travis uses, and run the job steps inside it. You can interrupt the process at any time to inspect state, which beats pushing commits to iterate. This only works for jobs that have already run on Travis at least once, since you need the build log to mirror the environment.

Context: Stack Overflow #21053657 (accepted answer, 567 votes): the asker does not want to push every small change to test .travis.yml edits. The accepted answer documents how to reproduce any Travis build job locally in Docker, including interrupting it to debug.