Say that at time $0$, $1$£ is worth $1$€. Indeed, like any good or service, a unit of £ can be seen as having a price in € (and vice versa).
At time $0$, Alice lends $10$£ to Peter. Assume that Peter can actually influence the exchange rate between £ and €.
At time $1$, Peter influences the value of $1$£ expressed in €, such that $1$£ is now worth $0.5$€. Peter then decides to reimburse Alice the amount of $10$£. The point is that this amount of $10$£ is only worth $5$ once converted back into €.
Alice, the lender, has lost $5$€ between time $0$ and time $1$. And for her, it was a bad operation given that she lives in a country wherein everything is priced in €.
For Peter, it may have been a good operation over the short term, especially if he does not need to import goods and services from €-based countries, indeed €-priced goods cost henceforth twice as much than at time $0$, since he would now need $2$£ to get $1$€, etc...
That being explained, I do not think that Alice is willing to lend Peter money anymore, at least not in a currency that Peter can influence... She has learnt the lesson and, in the future, she will always write debt contracts which amount will be explictly expressed in the currency that matters most to her, i.e. in €.