断点问题 [英] Break point issue
问题描述
我正在一个winforms应用程序中,在一个函数中放置一个断点,如
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 going 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:
- 在您的解决方案中设置正确的启动项目
- 设置断点
- 命中 F5
- 运行您的应用程序,您知道您的功能应该被称为
- 调试
- set correct startup project within your solution
- set breakpoint
- hit F5
- run your application to the point where you know your function should be called
- debug
如果您无法点击 F5 (无论什么原因)
If you can't hit F5 (for whatever reason)
- 运行您的应用程序
- 设置断点
- 附加到应用程序的进程(您将在流程列表中看到它)
- GOTO步骤#4以上
- run your application
- set breakpoint
- attach to your application's process (you'll see it in the process list)
- GOTO step #4 above
就是这样。
(如果这是你所要求的)
这篇关于断点问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!