Reputation: 1827
I know I can edit values or properties on an object in the Chrome debugger, but is there a way to add properties?
Edit: Here's an example of what I mean. In this popup window I can edit that values of these properties on this object. Is there a way I can add new properties to this object?
Upvotes: 5
Views: 4448
Reputation: 4271
For the example in your image, if you were stopped in debugging mode all you would have to do is enter something like $scope.newProp = 'value';
into the console. The object will now have a new property while you continue to debug your program.
Upvotes: 6