Have you enabled ASP?
Server manager > Roles and Features > IIS > Application Development > ASP
or if you a on Windows 10 > Control panel > Programs and features > Turn Windows Feature on or off
https://docs.microsoft.com/en-us/iis/application-frameworks/...
As for debugging, set a breakpoint in visual studio and attach to W3WP process, reload page
This question is better asked at https://serverfault.com/