The debt that is on you is deductible from the total Zakatable properties (including cash) if it is going to be paid out of them. But if it is going to be paid out of future income, it is not deductible. Example: you have cash 10,000 on which the hawl has passed and Zakah is now to be calculated. You also have a debt on 240,000 on your house, it is due on monthly payments of 1000 for 20 years. Ask yourself: is this debt going to be paid out of the 10,000?! It is very likely that only 1000 is going to be paid out of the cash that you have. If the date of its payment is before your next salary, then you deduct only 1000 and calculate the Zakah on 9000. But if the date of the payment is due after you get your next salary, you should not deduct this installment because actually like all other installments it is going to be paid out of future income.
But if the debt is to you, not on you, and the debtor is able to pay it and recognizes his/her indebtedness to you, this becomes a strong debt and you have to add it to the Zakatable items you own now and pay Zakah on it as any other Zakatable item that you own. This debt is a part of your wealth. If the debt is doubtful to be collected, you may not include it in the calculation of Zakah to the extent of the doubt (e.g., 20%. 50%, 705, 100%).
Allah Almighty knows best.