ng-inspector icon indicating copy to clipboard operation
ng-inspector copied to clipboard

Console log the result of a function

Open Antonio-Laguna opened this issue 10 years ago • 2 comments

Hi there!

First of all, great work here. I think it adds value to what we could have previously with Batarang.

That being said, I've seen that clicking on most of the stuff that has the TreeView will log something to the console, which is great. However, I think there could be room for improvement.

Currently functions are being logged as is and that's of little use IMHO. I think you could add the possibility to log the value returned by that function. Now I see the issue that probably a lot of functions require some argument and/or return nothing but still I'd expect that clicking or maybe double-clicking [?] to a function, would log the returned value.

What do you think?

Antonio-Laguna avatar Jun 17 '14 09:06 Antonio-Laguna

That's an interesting idea @Belelros, I can definitely see the value in being able to call the functions from the extension, although the UI for that will be a little challenging.

I've been toying with the idea of having a second view (either embeded in the inspector pane or as a popup/tooltip) to display details when an item in the treeview is selected, and the "call" functionality could live there, maybe even allowing the user to type in the arguments, with access to the relevant AngularJS scope (which could be a child of the scope where that function is defined).

rev087 avatar Jun 17 '14 12:06 rev087

That would be awesome!

Antonio-Laguna avatar Jun 17 '14 12:06 Antonio-Laguna