Interesting idea! Although it seems to be very invasive. If it really detours code the breakpoint suddenly modifies execution. Most debuggers seem to bebuilt as pure measurement tools. And i have the feeling for good reason: Understanding when the code will be executed is a big part of debugging. And the need to detour suggests the code is poorly debuggable.
Yes, visual studio lets you do this. You can drag the marker on the line of code that it's paused at, and move it around. There's probably restrictions, however it works in most simple cases.
A link here indicates that it's also possible in VS Code, however it may be C#/C++ only.
You can drag the marker on the line of code that it’s paused at, and move it around.
That is not the feature I described, though. I'm aware of CTRL + SHIFT + F10, but the feature description is basically a simple way to automate setting the next statement.
Be honest: Is there an issue with the representation of the page or did you skip those parts?
Ah, I see. I didn't see the bit about it being a breakpoint (detour point?). That's what I get for skim reading rather than comprehending it. Visual studio will let you do this, but it's a manual step, by combining a normal breakpoint and an execute next statement, and you'd have to do this each time you hit the breakpoint.
Having it happen automatically? A fairly niche feature, but I can see a few uses for it. The component features are already there, so I don't think it would be difficult to implement in a debugger that already supported execute next statement.
Many debuggers have a set next statement kind type of functionality, but with gdb you can script it so that it performs the jump automatically, like the article suggests:
Actually I've been working with VS the last X years and I'm pretty sure dotnet doesn't have this feature. Sure, you can set the next statement, but I wouldn't know of a simple way to say ahead of starting a debug compile "Ye, I want to skip those lines and takes this branch." Other than changing the source code, that is.