Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I do not normally code in C# and was wondering if Visual Studio had a particular debugging feature that is similar to the Python Debugger. In the PDB, during a breakpoint I will often print certain function calls and variables as well as test certain if statements. Although I can see variables in the 'locals' tab, I can't do print statements like list[i] or foo(var) or if(f(x) == 1) which I think are powerful debugging tools. Is this feature at all available in VS? Thanks for the help.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
2.8k views
Welcome To Ask or Share your Answers For Others

1 Answer

In Visual Studio, you can "Insert Tracepoint" from the context menu under "Breakpoint". Alternatively, you can create a breakpoint and open its properties then set the "Actions" checkbox.

inserting tracepoint


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...