Both can work. The principle behind each is to "break the dam" and allow liquid water to run down and off the roof, instead of backing up under your shingles.
As it seems you understand, the better fix is to insulate and air seal the attic (and install ridge vent if not already there) so the attic stays cold and doesn't melt the snow on the roof in the first place.