简体   繁体   English

Java Swing 或 AWT API - 在全局鼠标单击事件上设置断点

[英]Java Swing or AWT API - Setting breakpoint on global mouse click event

Most browser dev tools allow to set breakpoints on mouse events (without having to specify the source code line numbers) for JavaScript which can be used to find the handler(s) being executed when the event occurs.大多数浏览器开发工具允许为 JavaScript 设置鼠标事件断点(无需指定源代码行号),这可用于查找事件发生时正在执行的处理程序。

Does something similar in functionality for Java (Swing or AWT API) exist?是否存在与 Java(Swing 或 AWT API)功能类似的东西? Or are there any commands or APIs or IDEs to accomplish this?或者是否有任何命令或 API 或 IDE 可以完成此操作?

It appears that there is no known command, API, IDEs, or debuggers that allow to set breakpoints on global events for Java yet.似乎还没有已知的命令、API、IDE 或调试器允许在 Java 的全局事件上设置断点。

So, manually pausing the debugger in the beginning and going through the cycle of pausing, continuing, stepping in, and stepping out seems to be the only solution at the moment to step into the event handler code.因此,在开始时手动暂停调试器并经历暂停、继续、进入和退出的循环似乎是目前进入事件处理程序代码的唯一解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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