If you cannot set the next statement to your desired line, Visual Studio 20005 does an excellent job in letting you know why. For example, attempting to set the next statement outside of the current method will cause Visual Studio 2005 to display the following message.Unable to set the next statement to this location. The next statement cannot be set to another function.My favorite way to use Set Next Statement is in testing a new block of code. Provided that the code does not significantly alter the runtime state of my application (ex: modify a global field which impacts the re-running of the code I wish to test), I typically do the following:
Unable to set the next statement to this location. The next statement cannot be set to another function.
The above steps will also allow you to experiment values that may help fix calculation related bugs (ex: centering text in a form). I also use the above steps to provoke error conditions in my code, to make sure the error handling code behaves correctly.Have fun!-- DKDisclaimer(s):This posting is provided "AS IS" with no warranties, and confers no rights. Some of the information contained within this post may be in relation to beta software. Any and all details are subject to change.