1) Yes, I usually create an object literal to act like a simple class. Then i make a method on that called init and pass all the required values from the view to it on document.ready.
Create your class in the external file like this:
var someHelper = {
init: function (options) {
},
otherMethod: function (params) {
}
};
Then from the razor view i do something like this
<script>
var options = @{new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(Model);};
someHelper.init(options)
</script>
If you place the init-script early on the view, you can then in the code call the methods you need as if it was inline.
2) use console.log(objectToInspect) to inspect the values in the developer console. This should work in chrome, firefox and IE (IE needs to have console open before called).
3) Create a route in your asp.net project that accepts a string at the minimum. In your javascript setup a method that posts the data (as a string) to your asp.net endpoint/route with an ajax call. Using jquery to build the request is probably the easiest way. Also if you want to log data before jquery is loaded/ready, you can hook your logging up to a method that can simply push the errors into a array and once jquery is loaded, flush/post that data to the endpoint along with any new loggings.