It does depend on a lot of factors . . .
my personal position is that I NEVER use a debit card.
Guess I have heard too many "scare" stories about crooks wiping out people's accounts, etc. So, I always use a credit card (knowing I will be liable for a maximum of $50 for unauthorized charges makes me feel better than someone draining my checking account). And since I pay all credit card bills on time and do not have to pay any fees/interest/etc, it is the credit card route for me.
BUT
other people have different perspectives.
I do purchase foreign currency before I travel. I buy mine through Wells Fargo. In terms of foreign currency purchases through WF, you do NOT need to be an account holder (as opposed to BofA). And, I have found that the currency rate through WF is better than other sources. WF sells the foreign currency online (or, you can phone them toll free) and sends it out NEXT DAY FEDEX delivery; if you order more than $1,000 you do not pay any delivery fee for this service.
The only "bad" thing from the above is that my CC all treat this as a cash advance, so I do wind up paying a small fee for that function (I guess I rationalize it away because my CU does NOT reimburse for foreign ATM charges, so I think of it as merely a wash).
I understand that you can walk in to certain specific WF branches and buy currency on the spot, paying by a withdrawal from your checking account, BUT since I am not an accountholder with WF, I do not have any experiences to share in this regard.