Fingerprint report currently shows the APIs that were called but there is no way to learn the script filename that called the API. It is possible to learn the caller via Error.stack API (create and catch an exception).
My previous work shows that creating and catching exception requires some performance. So this functionality should be enabled only in specific situations and only temporarily. The expected use case is a user trying to defined a custom rule for uBlock Origin or a similar extension.
If it was possible, a possible implementation is:
to comment on this ticket.