"When you buy this, you may overpay for it. If you do, gain 2 Actions each costing the amount you overpaid."
You overpay independent of possible gaining targets.
I don't see your point. Maybe I expressed myself a little sloppily, but it doesn't change anything. You overpay with the cost of whichever card or cards you wish to gain. Of course you can also overpay with a cost that doesn't correspond to any card costs. The point was simply that "debt" is a cost, and if buying a "debt" cost card involved paying for the cost, then that means you can also overpay "debt" (if not for the rule that specifically says you can't).
Official rules (taken from wiki):
A player may pay any additional amount for such a card, and then gets an effect based on how much extra was paid. Potion (from Dominion: Alchemy) may be used in overpaid amounts if desired, although this is not always meaningful.
It says nothing about card costs. Overpay works independently of how much cards cost, instead focusing on amounts that you pay. Debt may be a cost, but that doesn't make it an
amount that you can can be
paid. It could have been defined that way, but it isn't.
I feel like "it's inconsistent whatever the ruling" is the better direction, so consider this. The original base game rules say this (taken from the actual rulebook):
The player can gain one card from the Supply by buying it -paying the cost shown on the card. The player pays in coins from Treasure cards (the number on the coin) and from previously paid Action cards.
Potions are already inconsistent with that. Expansions expand the rules.
With the addition of debt, you have to be inconsistent one way or the other. Either you expand the definition of "cost" to include stuff that isn't paid (i.e. debt) or you expand the definition of "pay" to include taking stuff instead of just spending amounts accrued via played Treasure and Action cards (and coin tokens, and events).
Expanding the definition of "cost" is more in keeping with natural language.