I have an application that has two distinct parts, one operation that process data and adds it to a database and a second operation that retrieves the data and makes a report. Is there a way to tell the debugger to start at the second operation of the application? Previously I've commented out what I didn't want to run and worked around my issue in that way. Is there a better way? Thanks.
I assume you have two methods in one piece of code, such as a Main method?
Main()
{
DoOperationOne();
DoOperationTwo();
}
An easy way to skip over one is to read about Set the Next Statement.
Breakpoints? E.g. assuming the app structure is
DoTheFirstPart()
DoTheSecondPart()
put a breakpoint on the second part and run in the debugger, and then once you hit the breakpoint, do whatever other debugging you need (add more breakpoints, turn on catch-all-exceptions, etc.) This will still run the first part - it's unclear to me if that's what you want or not.
(Question is a little vague, it's unclear what strategies you know/tried and what your goal is.)
If your language has an equivilent to #ifdef you could use that and a runtime parameter to avoid repeatedly commenting out code.
Edit: This assumes you don't want the first operation to run for whatever reason, question's a bit vague.