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!
Your syntax looks correct, and it works inline. Did you make sure you closed all your script tags?
Won’t work. If that’s not it, I got absolutely nothin’.