I had the same problem when I was sewing through some thick canvas and it turned out that I was using the wrong needle. It seemed odd that the needle would make the thread break but when I swapped to a really heavy duty needle it worked straight away.

Since you're sewing through denim you may need a really sturdy needle. It's worth a try!