How to have non-minified files to be rendered on DEBUG configuration

I have C# asp. net framework Visual Studio solution. The .aspx/.ascx files do have a script tags written. Since we use a minified mechanism outside of Visual Studio, minified files are being referenced on the pages.
e.g.

The problem is, whenever I want to debug, I need to remove the .min from the script tag, so that the non-minified file is rendered.

The problem is, developers do often forget to put the .min back to the .aspx/.ascx files, then the non-minified files get rendered in non-prod and prod environments.
I am looking for a solution, where I can remove the .min.js from the script file, whenever the web project runs in the DEBUG configuration, so that
-developers does not have make this change and later forget to put the .min back to the code base.
So, in theory this what I am trying to achieve

In the DEBUG configuration, I should have the script tag to be <script src=abc.js></script>
I think it can be done with some sort of code behind code to insert the entire script tag.
I do not think I can go with RegisterStartUpScript part, as I have files in MVC as well.

tried if I can perform a code-behind C# code to insert a script tag, could not succeed.