how to set a breakpoint at the middle of a line of C# code?

独自空忆成欢 提交于 2019-12-12 02:09:29

问题


For example, I have the following code,

Variable.Method1().Method2();

I want to set the breakpoint after Method1() and before Method2(). Can I do so in visual studio? How to do it? Thanks.


回答1:


That won't work, but this will:

var result1 = Variable.Method1();
result1.Method2(); //set breakpoint here

Otherwise set a breakpoint at the first line of code on Method2 and then you can keep using that one line of code.



来源:https://stackoverflow.com/questions/15942830/how-to-set-a-breakpoint-at-the-middle-of-a-line-of-c-sharp-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!