Use the Initiator column in the Network panel. Clicking on the link in the Initiator cell takes you to the line of code where the request was made.

If you can’t see it, right-click on the table header and select Initiator.
You can also hold Shift while hovering over a resource to see it’s initiator. The initiator is green. Dependencies are red. If you can’t see the initiator, then it’s not currently visible on the table (could be higher up, filtered out, etc.)
MacPrawn’s XHR Breakpoint idea is a good approach, too.