Currently, I am in the process of debugging an ASP.Net website. The debugging process involves utilizing Visual Studio 2012 and running the site locally on my Windows 10 machine using IIS Express. In order to test the web application, it needs to be accessed through Internet Explorer 11.
During the runtime of the code, I encounter an exception that is detected by Visual Studio within the on-page JavaScript (not displayed below). Despite knowing that the code functions perfectly in production, it fails to operate as expected when debugged locally.
Below is the section of code causing the issue:
var elements = document.getElementsByTagName('input');
for(var i = 0; i < elements.length; i++) {
var value = elements[i].getAttribute('value');
//....
}
Upon local execution,
elements[i].getAttribute('value')
returns null. However, this same code performs correctly in a production environment. Even though the attribute "value" exists in the element during debugging, the mentioned line of code still yields null.
I am restricted from making any alterations to the code (for specified reasons), and since my coworker is able to run the code without issue on their machine with an identical setup, I suspect there may be a configuration problem either within Visual Studio or another aspect of my workstation.
I am open to all suggestions regarding the potential cause of this discrepancy.