Ah yes, but you forget a couple of things here...
First of all, Scotland would be one of two EU nations to produce its own oil and gaz (the other is Norway). That gives it A LOT of leverage, especially since they can't possibly burn all that fuel in Scotland itself.
After the initial shock, you can bet dozens of countries (China? Japan? others?) would send delegations to Scotland to finance pretty much everything they want, provided they get a piece of the North Sea action (so to speak).
Second, there is a very common doctrine in newly-formed nations to refuse to honor all debts contracted in their names before independence. Hence, whatever debt the UK had, Scotland can now refuse, since it is now independent. That would blow the whole of the City of London to smithereens (which is a very good reason to vote Yes if you happen to be a Scot).
Combine the two, and you have a newly independent country, with zero debts and very interesting natural resources. Give it a little time, and investors from all over the world would beat a path to Scotland's door, checkbooks in hand.
Sure, the economic transition would be quite difficult, especially if the SNP persists in its own silly plan of keeping the Queen, keeping the pound (soooo stupid this one!) and applying for EU membership, but Scotland has a lot going for it.
Whether it can avoid the natural ressource trap is something else again, of course...