A trick I use to keep pests out of my vegetable garden is to plant it near something that birds like to eat. Why? Because birds also like to eat bugs! When there are populations of birds nearby, there seem to be very few bugs. Just in my experience, anyway.
This year I planted my garden patch beside a couple of mulberry trees. The berries fall into the garden, so birds come to eat the berries and also gobble up the bugs while they're there. Makes for a lot of bird poop in the garden, but hey, it's free fertilizer, right?