Rxjs debugging subscribers

I wanted to see how many listeners there was for a certain subject, and where they reside in the source code.
Here is how in chrome devtools, put a breakpoint before the subjects .next() call. And inspect the subject:

observers array count = number of “listeners”
FunctionLocation = source code reference

(Context: Angular v11, rxjs)

Leave a Reply

Your email address will not be published. Required fields are marked *