How to dynamically set a function/object name in Javascript as it is displayed in Chrome
问题 This is something which has been bugging me with the Google Chrome debugger and I was wondering if there was a way to solve it. I'm working on a large Javascript application, using a lot of object oriented JS (using the Joose framework), and when I debug my code, all my classes are given a non-sensical initial display value. To see what I mean, try this in the Chrome console: var F = function () {}; var myObj = new F(); console.log(myObj); The output should be a single line which you can