Javascript - Function call will not enter function body
- by Mike S
I have a function acting as a constructor that, when called, gets as far as the function definition in the debugger, but never to the function body. Is there a common reason this may happen that I am overlooking? Example code below:
myconstructor.js
function MyConstructor(optionalParam) { //this breakpoint gets hit
var newobj = {}; //breakpoint never hit
//code to check for null parameter
//other code
};
main.js
var myConstructor = new MyConstructor();
There must be something I have overlooked, but I can't see what that is. Neither firefox/firebug nor VS report errors or warnings.
Thanks!