Debugging Tips and Tricks – Exporting Breakpoints
One tip/trick/habit that I have found worth its weight in anti-matter is exporting your breakpoints.
Working in a large code base can yield long debug sessions, I’m talking days, and many crucial breakpoints. Here is a painful scenario I used to run into :
Spend 3 days debugging a diabolical mystery
Take pride in becoming the resident guru on the subject/use case/code
Weeks later receive a new task involving that same code (cuz your the master) only to realize you’re not as bad ass as you thought cuz you can’t remember where all that code is.
2 weeks can seem like months in a fast paced environment with a large code base and you can easily spend hours rediscovering that tiny snippet that was the crux of a previous issue and the key to resolving a new one.
By exporting your breakpoints you can easily reload and leverage the knowledge and work you put into the previous task.
1. Do your rockstar debug session amassing crucial breakpoints
2. In your debug perspective select your Breakpoints panel, right-click -> Export Breakpoints
3. In the resulting dialog box click Select All ( or select the breakpoints you want to save )
4. Click Browse to select the location you would like to save the .bkpt file and name your file well – i like to include the date, issue description or jira number ( 5-26-09_newTerminalRingStatus.bkpt )
5. Make sure to uncheck Overwrite existing file without warning
6. Click Finish
Later, when you need a particular set of breakponts, right-click in your Breakpoints panel and select Import Breakpoints, Browse to and select your file, Finish.
more posts at www.toddrothe.com/blog