Play Devil's Advocate
Once she has started to complain about every bad part of her relationship, don't just sit there agreeing with her or attacking him — this will only get her to defend him and concentrate on his good points. At worst, she could develop a "persecution syndrome," which could lead her to think that everyone is against her doomed relationship and make her do anything to save it.
Instead, defend his actions while distancing yourself from his behavior. Say, "Not every guy would do that, but maybe he thinks..." By doing this, you will push her to focus on his bad points. To win the "argument," she will have to convince you — and herself — that her boyfriend is no good for her. When she's spent enough time "convincing" you that he is bad for her, agree with her. Tell her you had no idea her partner was that bad. This way, she will have heard nothing good about him — save for a few deliberately lame excuses from you — and will leave thinking she's right and he's wrong. An added bonus is that this tactic covers your tracks nicely. If you're accused of breaking them up, she will defend you and tell everyone how you tried to keep them together.
Be the Man She Wants
By now, you know the kind of guy she wants to be with, and you have planted doubts in her mind that her boyfriend is that man. It is time to step into the void that has been created. Gradually start acting like her ideal boyfriend. If she craves attention from him, drop casual lines like, "I was watching this show and I thought of you..." If he's not the giving type, pick up thoughtful yet nonthreatening gifts for her. As for sexual problems, increasing flirtation will get her pulse and mind racing over you. In short, progressively create the feeling that the two of you are already in a relationship. Cultivate inside jokes, ask about her family and suggest one-on-one activities.