Is philosophy useful in physics? How can philosophy help physics?
There is a famous aphorism credited to Richard Feynman:
"Philosophy of science is as useful to scientists as ornithology is to birds".
Of course Feynman liked to exaggerate in order to clarify his point. Nevertheless, I consider his statement a caveat against ascribing too much importance to the role of philosophy in science.
The importance of natural philosophy for physics has decreased in parallel to the increase of mathematical physics. Physics has transcended the world of everyday-concepts. Therefore, today theoretical physics has to be formalized by mathematical concepts (Hilbert space, Riemann manifold, fibre bundle etc.)
On the other hand one can easily compile a collection of statements of well-known physicists concerning the inspiration they got from the ideas of philosophers like Platon, Nagarjuna, Hume, Kant, Mach etc.
Possibly: The working theoretical physicist needs for his research a good knowledge in mathematics. While the elder physicist, when his research on specific problems is gone, likes to conceptualize the whole domain from a philosophical point of view.
In no case can one compare the importance of philosophy for contemporary physics with the importance of mathematics for physics.
Added: I recommend Weinberg’s book „Dreams of a Final Theory“ from 1992 with its chapter „Against Philosophy“. The chapter follows a quite demure but critical style of writing. Weinberg gives a survey of several philosophical paradigms having been employed to frame physical theories. Weinberg considers himself
an unregenerate working scientist who finds no help in professional philosophy. I am not alone in this; I know of no one who has participated actively in the advance of physics in the postwar period whose research has been siginificantly helped by the work of philosophers. […] here I want to take up another equally puzzling phenomenon, the unreasonable ineffectiveness of philosophy.
Einstein credited Hume for helping him free his mind about temporality and also Mach for focusing his attention on the source of inertia.
Constructivism was a philosophical view about what constitutes existence of mathematics. Can one assert something in maths without actually showing that it exists and here 'showing' means constructing. It birthed intuitionism where the excluded middle is denied in logic. A number of physicists believe that this might help explain the weirdness of QM.
Many scientists hold the view that science can't know, or doesn't claim there is, the absolute truth about the universe, but that it merely describes an unknowable reality which knowledge can approach closer and closer. This idea started with Plato (and Xenophanes in the theistic domain) and his unreachable mathematical heavenly objects which can be approximated by mathematics, and culminates in Popper's (quite unrealistic) view on scientific methodology, i.e., falsificationism. It's this view most scientists adhere to: "Theories need to be falsifiable, experiments reproducible, we never know for certain, pseudoscience is to be avoided", etc. Most scientists these days don't think further than this, and in this they differ, for example, from their 19th century predecessors like Mach, Bolzmann, Lorentz, and many more, or Schrödinger, Bohr, Einstein, of a more recent date, or Newton and Aristotle, Galilei, or Ptolomeus longer ago. Present day combiners of both disciplines (in which case there maybe is no division at all) are rare, and people like Capra, Chopra, or Sheldrake are laughed at, while the materialist investigators of the brain normally are higher esteemed (while their approach might be a dead-end street).