Visual Studio : Hotkey/way to step into f() in statement a()->f(b(),c(),d()) directly

前端 未结 3 2291
孤街浪徒
孤街浪徒 2021-02-19 07:54

While debugging, I am currently at this (next) statement :-

system()->executeFracture(calculateFracture(data));
                       ^^1          


        
3条回答
  •  走了就别回头了
    2021-02-19 08:18

    Encouraged by the positive feed-back, I show another possibility using the disassembly.

    Once the debugging has been started, the disassembly can be opened by context menu in source file view. Although, the disassembly is hard to read (at least for the unexperienced) some facts are helpful:

    1. C/C++ expressions are mixed in as well as symbols for addresses.
    2. The assembler command for function calls is simply call.
    3. The function arguments are evaluated in reverse order (beginning with last argument) regarding their notation in source code.

    Playing around with this I observed the following behavior:

    1. Source code and disassembly may be displayed side by side.
    2. Once disassembly has been opened while debugging, it will be closed at end of debugging but will re-open in the next debug session automatically.
    3. Ctrl+F10 works in assembly too (the important fact concerning the question). Thus, every individual function call in a statement may be addressed.
    4. Clicking into source view (i.e. focus in source view) activates source level debugging, clicking into disassembly activates disassembly.
    5. Clicking into disassembly changes "Auto" to display registers but "Local" displays local variables even when disassembly active.
    6. Placing break-points into disassembly is not a good idea. They seem to refer the op-code address and thus probably become worthless as soon as source code is changed and (re-)compiled.
    7. When debugging in disassembly reaches code compiled of another source code file, the source code view is not updated automatically. However, there is a command "Go To Source Code" at top of context menu of the disassembly.

提交回复
热议问题