Visual Studio allows debugging line by line, or to jump straight to anywhere using a breakpoint.
But for example:
for (int i = 0; i < 100000; i++)
{
//DO SOMETHING HERE
}
How can I jump immediately to 500th iteration of the loop?
The fastest I have found so far was to:
F5
multiple times.I'm using Visual Studio 2019.
You are looking for a conditional breakpoint that has been already covered few times on StackOverflow.
for (int i = 0; i < 100000; i++)
{
#if DEBUG
if( i == 500)
{
System.Diagnostics.Debugger.Break();
}
#endif
}