开发者

Break point issue

I am putting a break point in a winforms application inside a function like

public void FillOutListViewCtrl()
{
    // code to be debugged
}

I put a breakpoint here. After running the application I just want to know what exactly is g开发者_运维百科oing on inside of this function. Is there any way to go to this function directly? Do I need to attach to any process to achieve this?

Project uses a complex class hierarchy and I would like to know the best possible way to solve my problem. I don't know of any responsible action for going inside this function though this project is large with a large class hierarchy.


You don't need to do anything special. Just follow these steps:

  1. set correct startup project within your solution
  2. set breakpoint
  3. hit F5
  4. run your application to the point where you know your function should be called
  5. debug

If you can't hit F5 (for whatever reason)

  1. run your application
  2. set breakpoint
  3. attach to your application's process (you'll see it in the process list)
  4. GOTO step #4 above

That's it.
(if that's what you were asking)


If you run the program with the debugger of visual studio attached (just press F5) and you have a breakpoint in the method, than the program execution should stop whan the method is being called and you should be able to step through the method.

So, no, nothing special needed.


Set a breakpoint at the first line of the method. Run yur application. When the method is called the execution stops at your breakpoint. Now step through the method by F10 key . you can rightclick on some variables and quickwatch variables, skip execution to different line by rightclick and set next statement to the line. Again F5 to execute the rest.

If it helps please mark as answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜