Practice it in 10 knots, then 20, then 30. You will soon find the sail set and rudder angle that will accomplish heaving-to in differing conditions.
Some modern designs don't heave to very well, or have a narrow "sweet spot". Others, like performance cruisers or racers, might do better to run off the wind. Some boats that CAN heave to should sometimes run: sea state, wind and proximity to the shore will dictate this. A GPS that can calculate XTE or "drift" is a big help here, because you can see if you are likely to forereach into danger given an expected wind range.
About the only technique that I think has been largely discredited is lying a-hull. Nobody seems to do it anymore, although it was once considered a valid "pit stop" technique.