I’ve used beer traps to pretty good effect. Slug-Go also does a decent job, but I find that combining “treatments” keeps them at bay for long enough that any damage they might inflict later on doesn’t hurt the mature plants.
Squash vine borers...I surround the bottoms of the vines with either paper towel rolls or Solo cups with the bottoms cut out. It helps that I usually only grow cucurbits, which they don’t really like, but when I had “volunteer” pumpkins a few years ago they didn’t give me trouble.