>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:
>> 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
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.