When I lived in Beijing, I ussd to eat frequently at the Wangfujing night food market, and usually make it there at least once when I go back to Beijing. It is a snacker's heaven! There is every snack available, including regional specialties from throughout China, all in individual servings. I've never been brave enough to try the bug kebobs (grasshoppers, beetles, etc), but a friend who tried the scorpions says they tasted like popcorn. I'll take her word for it.
Even if you don't go there to eat, it's fun just to walk by the stands and see what's available.
I have been fortunate enough to have never gotten sick on street food. However, I've gotten sick after eating in restaurants. I asked someone about this once, and he explained street vendors only buy enough food to sell that day. Restaurants, on the other hand, buy large quanities of food which may not be properly refrigerated and sit out, gathering bacteria. Makes sense to me.
I do follow certain rules when deciding what street vendor I'll buy snacks from. First and foremost is how clean is his cart. If I see any dirt or the vendor not following good sanitary practices, I'll pass on by. Secondly, as much as I love kebobs, I'll never buy any on metal skewers -- you just don't know how well they've been cleaned between customers. It's got to be disposable skewers or I'm out of there.
And for extra insurance I have been vaccinated for hepatitis A.
Eating street food is a personal call. If you don't try street food, you're missing out on an important part of a country's culture. But if you do try it and it makes you sick, you're missing out on part of your vacation while you're recuperating in your hotel room.
Please see my website for more information about traveling in China.