Because shopify loves to makes these things like completely backwards non obvious and more complicated than it needs to be: If you make a file with “min” in it’s name the auto-minification doesn’t mangle code.
So theme.js > minified , workflow disrupted
theme.min.js > unminified , no post processing , workflow restored
That’s right to get an uniminified source while working on a theme you have to put unminified sources in a file named as if it’s minified.Other sane expectations do not work to turn off post-processing of resources like enable_js_minification=0 , or a complementary disable_js_minification , using raw in the name or as a parameter or as a path with assets /assets/raw.
Or at least recognizing that a debugger statement shouldn’t be stripped out.