How do you know when it's time to stop watching a show?

Sometimes a TV starts out strong, with a compelling plot, crackling writing, and intriguing characters, and then...well, slowly unravels. So how do you make the decision to just stop watching?

It's not always so easy to stop watching once you've sunk some time interest into a story and characters. But, in response to this post, on shows that had the worst change of directions, a common theme of finding the right stopping point began to emerge.

For Alias, commenter RodgerRodger recommended stopping just short of the 2nd season:

Alias was murdered by the network making it shift directions many times. First, they had to kill the double agent story line, which is kinda the point (if you pick up Alias, I would just stop there 3/4 of the way into season 2). Then the season 2 cliff hanger. The the love triangle. Finally, we're pretty sure we're going to wrap this us, Garner is coming off a baby and should be doing movies so let's give her a break... but maybe we keep this going, so let's try to add new main characters and work them in at the same time.

While for Heroes, commenter T. L. Evans chose to leave at season 3:

I loved the first season, grew rapidly bored with the second season that basically rewrote the rules of the first... gave up early on in the third season. I suppose my dislike of the series is because of exactly that: it changed directions and destroyed the very concept that made it good

So, what do you think? When a show has started to fade in your affections, do you keep watching or pull the plug? And what are the best shows to watch, only up until a certain point?