简体   繁体   中英

Break at unknown line of code

Is there a way to break at a line of code without knowing where to put the breakpoint?

I often don't know the name of a certain class, but I do know which control in the UI causes the problem. So either I need to get the control's name from the UI
or
stop at when a certain event is fired (eg a MenuItem is clicked and a Dialog is shown - I want to stop at the event handler or the dialog's constructor).

I know it's possible for HTML pages to hover over parts and see their names. Does VS2012 provide something similar?

You may be need something like :

UISpy Which you can use to investigate controls on your windows and event they fire.

Yes, you may open the Visual Studio IDE and break execution of the code. It will break on the current executing code and will let you debug from there.

Not sure if it will let you reach to any unknown line of code.

Worth giving a try!

单击运行时流或Visual Studio Ultimate IntelliTrace的按钮,然后在其中放置断点后,可以了解执行了什么代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM