This is how external debt is explained in wikipedia:
"In public finance, external debt (or foreign debt) is the component of the total government debt which is owed to foreign creditors; its complement is internal debt, which is owed to domestic lenders. The debtors can be the government, corporations or citizens of that country."
Government debt is the debt owned by a government or sovereign state to lenders. It does not include the debts of private entities in the country. External debt is a part of government debt. Then how come the debt of corporations or citizens contribute to the external debt of a country?