I think the Lefschetz trace formula says something like:

if $F: X \to X$ is a continuous map of compact manifolds, then

$\chi(X^F) = \sum (-1)^i \mathrm{Tr} f_*|_{H_i(X)}$

First of all, this statement is not quite right even when the fixed points $X^F$ are isolated, I am supposed to somehow put in the indices, right?

So what are the indices and how do I put them in when the fixed points are not isolated?

But, also:

Under what hypotheses can I use it, or something similar, for maps between non-compact, infinite dimensional, etc., etc., spaces?

or perhaps I am asking

What is the most general version of the Lefschetz trace formula?