As global stock markets tumble and analysts fret over the health of economies such as China and Brazil, bond investors are saying once again, we told you so.

Corporate-bond markets have been showing signs of weakness this summer, even before major stock indexes plunged in recent days. While there are no signs so far that the global stock rout is turning into a broader crisis, some analysts say the bond market often does a better job than the stock market anticipating economic turns and that investors should focus on debt-market trends for signs of when stability will return.

“Credit markets led stocks in 2000 and 2008,” said James Bianco, president of Bianco Research LLC. He said credit spreads, reflecting companies’ borrowing costs relative to the government’s, have been widening, or increasing, for a year and are “showing no signs of stopping.” Mr. Bianco added that “something is not right” in the world.

There are good reasons investors tended to ignore the warning signs from high-grade and junk bonds this year, despite the market’s solid record of predicting problems. For one thing, stocks were climbing. And much of the troubles in corporate bonds seemed due to tumbling energy prices, which were pressuring debt of companies in that business. About 20% of the junk-bond market is made up of energy-related companies, according to some estimates.

Surging sales of corporate bonds amid low interest rates was another reason to ignore problems in the bond market. Some said price weakness was simply a result of this surge of supply. Meanwhile, investors have been favoring securities that offered higher yields than government debt and were snapping up new corporate bonds.