简体   繁体   English

Eclipse:如何判断我是在运行还是调试非服务器应用程序?

[英]Eclipse: How to tell if I am Running or Debugging a non-server application?

Eclipse will let you know if you started a server in Running or Debugging state. 如果您在运行或调试状态下启动服务器,Eclipse将通知您。 For example: 例如:

在此输入图像描述

Is there a way to get this same information for locally executed programs (ie, desktop application, not web server application)? 有没有办法为本地执行的程序(即桌面应用程序,而不是Web服务器应用程序)获取相同的信息? I find often that I will be in the middle of testing my application and decide to set a breakpoint, but can't remember if I started via the Run or Debug icon. 我经常发现我将在测试我的应用程序并决定设置断点,但不记得我是否通过Run或Debug图标启动。 In this case, I normally kill it and start again (for sure this time in Debug mode). 在这种情况下,我通常会将其终止并重新启动(确保这次是在调试模式下)。 It would be useful to have this information available. 获得这些信息会很有用。 Am I just missing it somewhere? 我只是在某个地方错过了吗?

You can simply switch to the Debug perpective. 您只需切换到Debug perpective即可。 The running application will be available. 正在运行的应用程序将可用。 Then look in the Debug view : if you can expand using + your application and see running Threads, you are in debug mode. 然后查看Debug视图:如果您可以使用+您的应用程序进行扩展并看到正在运行的Threads,那么您处于调试模式。 Otherwise, application is just 'running'. 否则,应用程序就是“正在运行”。

You can look in debug perspective into Debug view. 您可以在Debug视图中查看Debug视图。 When debugging it shows the thread stack method invocation, 调试时显示线程堆栈方法调用,

Example debugging,

调试

Example NOT debugging,

在此输入图像描述

暂无
暂无

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

相关问题 如何从Javascript调用Java方法(非服务器) - How to call Java method from Javascript (Non-server) 如何为Eclipse项目使用非URLClassLoader类加载器,或以其他方式检测我在Eclipse中运行? - How can I use a non-URLClassLoader classloader for Eclipse projects, or otherwise detect that I am running in Eclipse? 如何判断我是否在 android:isolatedProcess 中运行? - How can I tell if I am running in android:isolatedProcess? 为什么在通过eclipse运行/调试TomCat时会收到ClassNotFoundException - Why am I getting ClassNotFoundException when running/debugging with TomCat through eclipse 如何判断Java应用程序是否正在Eclipse控制台中运行(例如,相对于xterm)? - How to tell if a Java application is running within the Eclipse console (versus, for example, xterm)? 第一次在 eclipse 中运行 spring 启动应用程序时,我收到错误警告。 我正在使用 JDK 14 - I am getting error warning while running first time spring boot application in eclipse. I am using JDK 14 如何启用 Eclipse 应用程序的远程调试? - How to enable remote debugging for an Eclipse Application? 在Eclipse中将Red5服务器作为Java应用程序调试的错误 - Bug in debugging Red5 server as Java Application inside eclipse 使用 Eclipse 作为服务器调试远程 Java 应用程序(套接字侦听) - Debugging a remote Java application with Eclipse as the server (Socket listen) Eclipse RCP应用程序调试 - Eclipse RCP application debugging
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM