Problems when uploading using "Upload using programmer"

So I have a SAMD21G18A chip and I uploaded an arduino bootloader (MKR GSM 1400) and programmed the board using "Upload using programmer". This worked fine for about a week, but now it suddenly stopped working. The upload process is successful but the code doesn't run. If I upload over USB it's fine, furthermore if I upload in atmel studio it's fine aswell. Any ideas what could be causing this?

Bugs in the code You didn't post.

I tried uploading basic codes that just print to serial and the problem is the same. I starded to get this error tho (when uploading using programmer) "Error: at91samd21g18.cpu -- clearing lockup after double fault", so i'm not sure if i bricked it somehow.