Breakpoint: last line in a method

While debugging, many times I want to set a breakpoint at the last line of a method to check values before leaving the method.
And also many times this last line is a “next” or “end if” of a for-next loop or if-end if segment.
Taking into account that breakpoints can not be set at “next”, “end if”, etc. lines, how do you manage to do this?

I don’t want a “Break” line because what I pretend is to set and release this breakpoint while debugging.

What I do many times consists in writing a line like:

Dim i as integer

where I can set a break point.
But I think this is a bit stupid, isn’t it?.

Use the command Break, works perfectly!

Stupid me, didn’t read the whole post …

I sometimes use a strategy like this (similar to the one you mentioned), and it’s the only way:

for i as integer= 0 to whatever
    // Do some stuff
next i
s = s // A place to break, and ultimately harmless
// "s" represents some variable that had already been declared

If you really want to make sure your compiled code is clean:

#if DebugBuild
s = s // A place to break

Thanks Kem
I also use this different strategy when I have an available variable.

Well, I just wanted to know if I had missed something obvious.

Oh, silly me, I just thought of the perfect solution. I don’t know why this didn’t dawn on me before:

for i = 0 to whatever
  // code
next i

return // break here

There should be an existing Feedback report for this from me. From ages and ages ago…