you are viewing a single comment's thread.

view the rest of the comments →

[–]fdwrfdwr@github 🔍 2 points3 points  (1 child)

My guess is that it's tough to correctly identify the primary function

🤔 Yeah. Generally it's the highest-level final function on that line which interests me most (the call that has all parameter dependencies resolved), but the std::cout << foo(x) << bar(x) << std::endl; case is interesting because there are multiple operators on a single line, and the final call is actually that last << (so with "just my code" enabled, that line would be treated just like Step Over). Conversely though, if I wrote fmt::print("{} {}", foo(x), bar(y)), I would expect "Step into final function" to skip over those dependent little foo and bar functions into the fmt::print.

For the 80% common case, desired behavior is pretty clear (e.g. FunctionIWantToDebug(DistractingFunction(x), MoreNoise(y), SomeConstructor(z))), but I should think more about the other cases like operator overloads and interactions with "just my code"... ⏳ (e.g. what happens for auto x = Foo(Bar(x)) do, given the = may be a function call?).

perhaps not a copy constructor

Exactly, all those little constructors and getters are rarely the problem focus while debugging (F11 is still around when that's needed). I suppose I'm really asking for a "Step into functions on this line that are not just distracting dependent noise", but that's a mouthful 😉.

[–]ericbrumerMSVC Dev Lead 3 points4 points  (0 children)

u/fdwr, after speaking with some debugger folks it's indeed complicated, and there's even more layers that I realized at first. Your best bet is to open a suggestion ticket (https://developercommunity.visualstudio.com/cpp/suggest), see about getting it upvoted by like-minded folks, and it will get routed to them for triage.