We haven't grown squash in years but we do grow cucumbers, zucchini and melon. They used get attacked by the squash vine borer and the thing about these pest is you can't see them until it is to late...the first thing you will notice is wilted stems and leaves.
We have had very good luck getting rid of these pests by placing pieces of heavy aluminum foil 15-18 inches square around the base of each plant. The reflection seems to keep the borers away at least for a time.
I have never tried this but I have heard that if you do see some wilting you can look along the stem to see where the borer went in...the borer may not be far behind...cut the stem lengthwise just a little bit on both sides of the hole to see if you can find the borer and take it out. You still might lose the plant?