While investors have been preoccupied with President Trump and chaos in Washington, nerve-rattling elections in Europe and the uncertainty created by Federal Reserve policy and Britain's decision to leave the European Union, a once-familiar — and possibly bigger — risk to global markets has been bubbling in the background.

China.

Two years after China first set off investor alarm bells worldwide with a stock market crash, a slumping currency and concerns over rising debt, many investors have put those concerns out of mind. Shares of Chinese companies traded in Hong Kong and other places outside the mainland have surged to their highest levels since the crash, beating markets in other developing countries, as investors embrace China's thriving technology and consumer scenes.

Even in China, where the long-downtrodden domestic stock market still suffers from investor skepticism and government meddling, local shares enjoyed a run-up for much of this year before falling back recently.

"The vast majority of consensus opinion is that China is fine," said Kevin Smith, the founder and chief executive of Crescat Capital, an asset management firm based in Denver that is betting against Chinese investments. Referring broadly to China's debt and other financials, he added: "People are really not looking at the potential bubble. The bubble just keeps getting bigger."

More from the New York Times:

Why China's Growing Debt Load Worries the World

China's Addiction to Debt Now Threatens Its Growth

In China, Property Frenzy, Fake Divorces and a Bloating Bubble

China's fate has major sway over global markets, given its longtime role as a growth driver — and investors may soon have a bigger stake in the ups and downs of Chinese stocks.

MSCI, an investment advisory firm that compiles stock indexes that are widely tracked by mutual funds and pension funds around the world, is considering adding domestic Chinese stocks to a key benchmark. The company is scheduled to unveil its decision on Tuesday.

Investors have already received some encouragement to jump in. In March, Goldman Sachs recommended investors increase their holdings of Chinese stocks, citing improved economic growth, stable policies and other positives.

But some investors have started to worry again. In a survey released by Bank of America-Merrill Lynch, fund managers in May named China the biggest potential source for an unpleasant surprise for global markets for the first time since January 2016. The investor services firm Moody's also downgraded China's sovereign credit rating last month, its first such move in 28 years.

Debt is a central theme to these rising concerns. To shore up its economy, China resorted to pumping up credit, adding to an already mountainous pile of debt. According to the Bank for International Settlements, that debt reached 257 percent of its gross domestic product at the end of 2016, slightly above the same measure in the United States, and significantly higher than the 184 percent for emerging economies over all.

But what worries economists most is the pace at which it has mounted. At the end of 2007, China's debt stood at only 152 percent of G.D.P.

The research company Capital Economics, in a June report, warned that debt in China "has risen far faster than in almost any other major economy on record," and that its continued buildup was the "biggest risk facing emerging Asia."

Over the last several months, the government has tried to reverse this trend, helping slow credit growth. But that, too, has rattled financial markets in China. The fear is that tighter credit could both slow growth and make it more difficult for highly indebted firms to pay back those loans. In a sign of strain, the interest rates charged by banks when lending to one another have been rising.

Policy makers in China appear more worried, too. In late May, the government indicated it would tighten its grip on the renminbi, stepping back from a longstanding commitment to allow market forces a greater role in its valuation.

Mr. Smith of Crescat said he believed global investors remained too complacent about the China threat. Calling China "the largest macro bubble in our lifetime," he said the situation had "already gone beyond what global financial watchdogs claim are levels where other countries historically have gotten into trouble."

Mr. Smith has arranged his portfolio with these fears in mind. He said he was shorting China equity funds. (When investors short, they are making financial bets that the price of something is going to fall.) And though such positions have subtracted from his returns so far this year, he has doubled down.

Just since May, he has shorted individual Chinese companies listed in New York, including the e-commerce companies Alibaba Group and JD.com and the search engine specialist Baidu, which he argues are more exposed to China's shaky financial sector than many investors realize.

Investors may steer clear of China until the uncertainty about its heavy debt — and the government's will and ability to handle it — clears up.

"The biggest crisis tends to happen when people are not looking, when the government is not trying to tackle the risk," said Jian Shi Cortesi, who oversees the Asian equities portfolio at the asset-manager GAM, based in Zurich. "So far they are managing it quite well. But the market is always scared if they cannot manage it. "

Not all China watchers are quite so nervous. Aidan Yao, senior emerging Asia economist in Hong Kong at AXA Investment Managers, which has more than $800 billion under management, said investors should see the current effort to bring down leverage as a positive for the economy's future health.

"Right now, I'm not all that concerned," Mr. Yao said. Policy makers, he added, "are managing the situation quite carefully."

There is also some confidence among China analysts that politics will keep the country's currency and stock markets on track in the coming months. This year, a major Communist Party conference will take place. To avoid any undue surprises, policy makers are likely to do whatever they can to prevent drastic shifts in asset values before the meeting.

It is unclear whether MSCI, the stock-index compiler, will broaden global access for Chinese stocks. It has rejected adding China's domestic shares for three consecutive years, citing regulations that hamper an investor's ability to sell shares and take funds out of the country. The Chinese authorities have introduced some measures to address these issues.

Mr. Yao of AXA said he believed that Chinese regulators had opened up enough access to domestic markets to win over MSCI. But even he does not see that translating into an immediate rush into Chinese stocks, given China's problems.

"Long term, we are fairly cautious as well," Mr. Yao said. "People already know there is no easy out."