Speaking as an adult who has known children in trouble: If it’s a minor, then I would look at the parents or guardians for who the best people are to talk to, and if they are not horrible (or maybe even if they are, but I’d choose the best one(s) of those) let them know everything. They are responsible and should take charge and get the kid out of the situation and seeing people to get all the help they need. If I were connected enough to these people, I would try to do what was appropriate to see that it works out and that whatever adult sources of the problem are getting addressed too, if possible, as in my experiences with these things, there is often a major adult malfunction going on that has been the real root cause leading to the child’s crazy self-destructive behavior.
In general I would want to intervene and get the girl into a healthy situation if at all possible. Drugs and much older boyfriends and breaking laws and owing money to dangerous people is all generally pretty awful if there are better alternatives.
From the position of being a minor and best friend to a minor in these problems, I think it’s an awful position to be in and that you are awesome for trying to take it on and ask others for advice. I would advise doing the same thing. Size up all the possible adults you could talk to, and look for the ones who would actually be supportive and take control to get your friend on a healthy path, versus the ones who will undermine her. Of course if your friend has chosen to do all those things, she probably won’t want you to help her that way, but I would at least ask if you have her permission. If you do it without her agreement she may be very angry with you if you tell adults what she’s up to without consulting with her, and your relationship with her may change or she may stop being friends with you – you’ve probably already thought about that. Another option is to choose the best adults to give the information and give it completely anonymously, so you can also be there as her friend without adding the “you told on me” drama, but then you will have the secret that you did.
Other details might include, before any of that, if you haven’t already, talking with her about each situation one at a time, just to get some more details like who the dealer is, what he’s like, how much is owed, if she’s been threatened, who the boyfriend is exactly, and the other illegal choices. These both so you can know, so you could tell if you need to, and so you can help offer your concerns/council. Just being a sane friend may be one of her best resources.
Since you don’t know how dangerous the drug dealer (or his associates) actually are, I would try to find out details and also consider that it could be deadly serious. You don’t want to have underestimated that and end up with her being hurt, assaulted, or killed.