断点问题 [英] Break point issue

查看:117
本文介绍了断点问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个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:


  1. 在您的解决方案中设置正确的启动项目

  2. 设置断点

  3. 命中 F5

  4. 运行您的应用程序,您知道您的功能应该被称为

  5. 调试

  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

如果您无法点击 F5 (无论什么原因)

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


  1. 运行您的应用程序

  2. 设置断点

  3. 附加到应用程序的进程(您将在流程列表中看到它)

  4. GOTO步骤#4以上

  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

就是这样。

(如果这是你所要求的)

这篇关于断点问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆