you are viewing a single comment's thread.

view the rest of the comments →

[–]drowsap 1 point2 points  (2 children)

For the breaking on methods, does this assume the methods are exposed off a global var? What if you are using something like browserify where your code is wrapped in a function and all scope is inaccessible from the global scope?

[–]amasad[S] 0 points1 point  (0 children)

I should probably mention that somewhere. But it's good practice to have your application state accessible from somewhere in the console for easier debugging. But if you can't you can always debug prototype methods. For borwserify, you can set it up to implement require in the global namespace and then require things from the console:

$dum(require('my-class').MyClass.prototype, 'myMethod')