In the first presidential debate Monday night, Donald Trump praised the gleaming airports of Dubai, Qatar and China, holding them up as a counterpart to grungy American airports such as LaGuardia, Kennedy, LAX and Newark. “Our airports are like from a Third World country,” he said.

His point was that U.S. infrastructure is a mess. But the comparison to Dubai, Qatar and China was strange, to say the least. Although Trump has not been particularly shy about praising questionable governments, you don’t have to look far in these countries to see a dark side to their impressive infrastructure. It was often built on the backs of poor labor practices and the lack of property rights — things that Americans presumably would find unacceptable.

As Laura Bliss writes at CityLab, the United Arab Emirates (home to Dubai) and Qatar have been able to build gorgeous airports because they are petro-states with ample budgets. Even so, much of the gleaming infrastructure of these countries is widely recognized to have been built by lowly paid and often poorly treated migrant workers from South Asia.

In the United Arab Emirates and Qatar, the massive population of low-paid migrant workers are subject to human trafficking and abuses that amount to forced labor, Human Rights Watch said in its 2016 report. About 90 percent of the populations of these countries are foreigners, mostly low-paid migrants — something Trump’s nativist supporters would presumably would dislike.

In China, the drawbacks are different, but also plentiful. First, there’s the basic lack of legal property ownership. The Chinese government technically owns all the land in the country; residential property “purchases” by private citizens are actually 70-year rentals.

Local governments invoke eminent domain much more freely than Americans would accept. One dark side of China’s gleaming development is a spate of forced evictions in which residents are given poor compensation for their homes, harassed, and sometimes even killed by developers who are eager to turn their property into a highway, a rail line or a new building. Many of the protests that erupt in China spring from cases of forced evictions.

There’s another other dark side to China’s gorgeous infrastructure that is becoming more and more worrisome — the massive amounts of debt taken on to finance it.

This month, the Bank of International Settlements, a global banking regulator, warned that China’s “credit to GDP gap,” a common gauge of banking risk, has climbed to 30.1, the highest in China’s history and among any major country that it tracks. In fact, any score over 10 is typically seen as risky. The figure for China is higher than that seen in East Asia before the burst of a speculative bubble in 1997, and in the United States before the financial crisis.

There should be some happy medium, of course. Trump has a point: U.S. infrastructure could be a lot better. Indeed, economists have been urging more infrastructure spending for years, as a way to provide good jobs and also create a useful public good that would help to expand the economy. As someone who lived in China for many years, I would always cringe when Chinese friends who traveled to the United States would return shocked about how old and grungy it looked for such a wealthy country.

China’s impressive infrastructure has advantages. The massive construction of roads, subway lines and high-speed rail has enlarged the scope of its cities overnight and transformed the local economy. Property prices are rising and businesses are springing up in far-flung cities and suburbs.

On a recent trip to China, I traveled to a city 60 miles outside of Shanghai to have lunch with friends. A friend booked my ticket online, and the trip took 20 minutes on a gleaming high-speed train. At lunch, my Chinese friends wondered aloud why the United States doesn’t have a high-speed railway system like China does. It must be because our airports are so good that we don't need it, they charitably concluded.