On Wednesday, September 26, 2012 5:26:33 PM UTC-5, robert
...@yahoo.com wrote:
> On Wed, 26 Sep 2012 14:21:01 -0700, Daniel Pitts
> <newsgroup.nos...@virtualinfinity.net> wrote:
> >On 9/26/12 2:12 PM, bob wrote:
> >> Am I the only one who adds a lot of "NOP" statements to my code just so I can put a breakpoint there?
> >> For instance, in Java I might add:
> >> System.out.println("whatever");
> >> just so I can put a breakpoint there.
> >> Does anyone else do this?
> >> Should there be a high-level NOP that is easy to type?
> >Why not put a break-point on the statement directly after that? That
> >requires no typing what-so-ever.
> That may not be convenient - consider that if the following statement
> begins a loop, your breakpoint will likely hit for every loop
> iteration.
> But to the OP, yes, on occasion I have, but it's rare enough that any
> difficulty in typing it is irrelevant. But you really want something
> with few or no side effects, but that won't get optimized away or use
> a lot of resources. In Windows I've used a call to the (system)
> GetTickCount() and ignored the results.
In Windows C++, you could probably do something like