简体   繁体   中英

How do I know which method/class is called when I test java GUI in eclipse?

I am a beginner using eclipse for java programming. Recently I downloaded certain source code online and ran it in eclipse successfully. I want to learn how it runs. However, I failed to find a way to monitor the progress during the program running. For example, if I run the application and click certain button in the application GUI, how do I know which class/method is called? In other words, how can I use eclipse to monitor the process of program running?

The general answer is to use the debugger. For example, set a breakpoint in some method and then use "Debug As" instead of "Run As" to run the application within Eclipse.

Here are a couple of tutorials / articles on using the Eclipse Debugger.

在要调试的方法上放置一个断点(双击该行的左侧),然后调试程序。

只需将断点放在需要在Debug模式下查看和运行应用程序的代码行中,然后它将在您需要检查的相关代码行中等待。

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