It would depend on the kind of bugs in the dish washer and whether the dish washer has been being used. It is best to consult a professional about what chemicals to use when dealing with insects inside the home.
Dishwasher slugs are a real problem for some people. To remove them, fill your soap dispenser with bleach and run the dishwasher for a full cycle.
Get rid of the snails and slugs.
you must have a leak or moisture build up
Put some salt on them
put a DISH of beer in among the plants. slugs will go to the dish but not your plant.
Getting rid of Slugs.
you put salt on them or on the ground every where
Any of the products with metaldehyde extremely effective for snails/slugs.
Picking them off one by one.
Slugs, believe it or not have a very important purpose. They are decomposers, which means they eats wastes and organic materials of other organisms. They help get rid of the trash that animals leave behind.
you pray your hand wont come off and stick your hand in the compartment
Dawn in a Powdered detergant form
I've read in several places that pouring vinegar down the dishwasher drain (a lot) and then running the empty dishwasher will kill the ants and keep them from coming back.