Exercising outside can be one of the great pleasures of summer. But a sweaty body and racing pulse may be signaling more than your performance—it could be a sign of life-threatening heatstroke.

Heatstroke can strike with scant warning, even after as little as a half hour if you are exercising hard, doctors say. Although drinking plenty of water can help, you can still get heatstroke even if you aren't dehydrated, particularly while exercising. Complicating matters, experts have sharply divergent guidelines on how to treat...