ATC :: Since February 2001

Subscribe to ATC Send e-mail to Rob

I work at Pelco. The opinions expressed here are my own, and neither Pelco nor any other party necessarily agrees with them.

View Rob Fahrni's profile on LinkedIn
My Amazon.com Wish List

Google
Web rob.crabapples.net



Krusty will code C++ for food.
MarsEdit: Powerful Blog Authoring Made Simple. Need a Snow Day?
RSS
Harry Potter Automatic News Aggregator
Green Hosting! This site is hosted by Dreamhost.

Friday, November 14, 2008

Debugging: C++ Templates, Brekpoints, and Visual Studio - [10:05 AM]

A good friend, and co-worker Tom, has been on a Linux trip lately, which isn't a bad thing since we do create products that run on Linux. I've been giving him a bad time lately about his newfound love of Vi, and now he's getting into gdb, God help us.

Yesterday Tom posted some very useful tips for debugging templates in gdb, thanks Tom, but man, can it get any more arcane?

In honor of Tom's hard work I thought I'd share the same tip, only mine will be for those of you using Visual Studio.

1) Locate the line of code you'd like to debug.
2) Left-Mouse click in the left 'gutter', the grey strip that runs down the left of your edit window.
3) Press F5, or select Debug > Start Debugging.
4) Wait to hit the breakpoint.

Happy Debugging! Smile, life is good!

Favorite Linux debugging tip (not): "Just add some printf's to it"

Labels: ,


Click here for a permalink to this entry. comment