views:

44

answers:

4

Is there any way to tell the debugger to just continue until the next file is accessed, and/or until the next (developer written) function is accessed, without setting debug points ahead of time? I'm kind of new to VS debugging so all I use right now are f5, f10, and f11.

+1  A: 

There is currently no way to do what you are asking. The main ways of telling VS to go until something happens are the following

  • Hit F5 and VS will go until the next user breakpoint or ,depending on your settings and where it occurs, the next exception is raised
  • Right click and select "Run to cursor"
  • Shift-F11 breaks out of the current method

Run to cursor doesn't require an explicit break point but it does require that you know where you want to break next.

JaredPar
A: 

You can right-click and select "run to cursor" if you just want to run to a specific line ahead in the execution stream.

Another one is Shift-F11 which finishes the current method and breaks again when you get back to the caller.

Dean Harding
A: 

Looks like there's not a way to do what I wanted to do - thanks for the reponses though!

Bryan
fwiw: this isn't an answer. other's have posted answers to your question that should receive credit, even if the answer is that you can not do it.
Metro Smurf
A: 

Actually, there is a way to set conditional break points.

  1. Click in the left margin on the line where you want to break, as usual. (or F9)
  2. Right-click on the red dot. In the context menu, click on "Condition...."
  3. In the dialog, set your condition, e.g., fileName == "foo"
  4. Hit F5 and go until the conditional break is hit.
Cylon Cat