There's three kinds of debt. One is corporate. A company took on debt to buy some equipment. That can be mis-investment, but it's usually pretty good.
Second, there's personal debt. That counts both mortgages (usually worthwhile, unless you buy more house than you need) and stuff like credit card debt, where you're still paying for Christmas five years later. So, some is worthwhile, some not so much.
Third, there's government debt. This can be used effectively to create infrastructure. The problem is, though, that it's allocated not by a careful cost/benefit analysis. Instead, it's allocated by politicians. This kind of debt therefore has the highest propensity to be sheer waste.