count method usage
Answered
Hi,
Is there a way to count and have an overview of how many times a method or function is called in the code ?
Thank you
Please sign in to leave a comment.
Hi,
You could use the Find Usages. Place the cursor at the function name, double-click Shift and type Find Usages.
There you can see how many times the function is used in the code. However, it will also show other function usages (e.g. print(foo)), not only the calls.
It can also be used for variables, classes, etc.
If you would like a feature to count only the function calls, please feel free to submit a feature request about it to our issue tracker using the link https://youtrack.jetbrains.com/issues/PY
I was more thinking about a list of the methods/functions in a column and their calls in another one, more like a statistic feature. But thanks anyway.
Yes I would like this feature to.
Something like this...
i think this could help:
Settings -> Editor -> Inlay Hints -> Code Vision -> Usages
it works for Java
(but not yet possible for Scala as far as I've experienced).