Debugging performance issues

What’s the best way to debug performance issues? I tried to make a fake fps counter but it doesn’t seem to respond to changes in performance.

Ie: How can I determine what is slowing down my application?

sand858