昨天下午在 eclipse 中调试壹個 Java 程序,结果前面几次启动调试器都是正常进入断点,后来我退出了调试,再次以 Debug 模式启动程序时,eclipse 弹出壹個窗口,报出如下错误信息:
Can not find a free socket for the debugger in eclipse.
这种错误之前从未见过,当时令我非常的莫名其妙,于是把这串文本作为关键字 Google 了壹把,还真让我找到了,Stackoverflow 上有個国外网友也遇到了
同样的问题,而且看他的描述,与我遇到错误时的情景几乎壹样。
when i try to debug the java programe , it says "Cannot find a free socket for the debugger in eclipse".Could you explain how to resolve the error ?
以下是网友们提供的在 Windows 环境下壹個不太确定的解决方法:
The usual checks (some are Windows specifics) are:
•switch off the vista firewall (it wasn't activated, to be precise)
•add a firewall rule for java.exe/javaw.exe/eclipse.exe and reactivated it (just to be sure it didn't interfere although it was deactivated)
•deactivated my antivirus tool (avira antivir)
•ran eclipse as administrator
•disabled UAC
•activated/deactivated wired and wireless network interfaces
•changed priorities of the network interfaces
•used different jvms (1.6 and 1.7)
•created an entirely new workspace
比较遗憾的是,问题下方的网友答案对于我而言无壹点用处。为什么我这麽确定呢,因为同样的环境同样的条件,我在前面几次调试中并没有发生这個错误,但是重复壹段时间之后错误才会出现,所以可以确定是其它的外部因素引起的问题。
我继续想了想,发现壹個比较重要的线索就是,我们的程序堆栈中报了 NullPointerException,而报错的地方是读取 SQL 脚本写数据库的操作,于是我想,IO 流对象和文件路径都正确无误的情况下,那最大的嫌疑人肯定就是数据库连接了,马上检查了下获取 Connection 实例的地方,再问问同事,反映的情况是我们当前在使用的数据库还有很多用户也在使用,那麽问题就可以确定为连接数过多导致的失败了。我们随即登录管理端,清除了几個状态处于 IDLE 的连接,再次重新启动 eclipse ,问题解决。
分享到:
相关推荐
- 当Tomcat启动并等待调试连接时,Eclipse将自动连接并暂停在启动位置,此时你可以在代码中设置断点,进行单步调试、查看变量值等操作。 通过以上步骤,你就可以在Eclipse中成功配置并调试外部Tomcat服务器上的...
eclipse 远程 debug tomcat 和 websphere 的 web...首先,我们需要在 tomcat 中启用 JPDA 调试模式,然后在 eclipse 中配置远程 debug 设置。最后,我们可以使用 eclipse 远程 debug tomcat 和 websphere 的 web 应用。
在Eclipse中,启动调试模式主要有两种方式:一是通过菜单栏选择“Run” -> "Debug Configurations",然后配置并启动调试会话;二是直接在代码编辑器中点击方法名旁的绿色小虫子图标。 二、设置断点 断点是调试中的...
在本教程中,我们将深入探讨如何使用Eclipse调试器来调试Flash应用程序。Eclipse是一款强大的集成开发环境(IDE),广泛用于Java和其他语言的开发,但它同样支持Adobe Flash内容的开发和调试。通过集成的Flex ...
3. 调试选项:勾选“Start debugger”启用调试,可以设置启动参数和浏览器,以便在特定环境中测试。 四、设置断点 1. 断点是调试的关键,它允许你在代码的特定位置暂停执行。在Eclipse的源代码编辑器中,点击行号...
- "eclipse-2-set-up-the-debugger.ppt" 可能是另一个关于如何在Eclipse中设置调试器的PowerPoint演示文稿,可能侧重于具体的配置细节。 - "eclipse-1-create-a-new-project.ppt" 应该是介绍如何在Eclipse中创建新...
Kgdb is intended to be used as a source level debugger for the Linux kernel. It is used along with gdb to debug a Linux kernel. The expectation is that gdb can be used to "break in" to the kernel to ...
完成上述配置后,即可在 Eclipse 中启动远程调试会话。此时,Eclipse 将自动连接到服务器上的 Spring Boot 应用,并允许开发者设置断点、查看变量值等操作。 #### 四、常见问题及解决方法 1. **无法连接到远程...
Android 出现“Can’t bind to local 8602 for debugger”错误的解决方法 为了适应Android5.0的开发,把JDK升级到了1.7,然后在ADT中想调试一下程序(我连接的真机),结果报错如下: [2015-04-23 15:31:37 - ddms]...
标题中的"Debug---Eclipse"指的是在Eclipse集成开发环境中进行调试的相关知识。Eclipse是一款广泛使用的开源Java IDE,它提供了强大的调试工具,使得开发者能够有效地查找和修复代码中的错误。接下来,我们将深入...
We can find the `gdbserver` binary in the Android NDK or in the `BUILD/out/target/product/sm6150/system/bin` directory. 2. `gdb` client binary: This binary is used to communicate with the `gdbserver`...
"Android 出现“Can't bind to local 8602 for debugger”错误的解决方法" Android 开发中经常会遇到一些错误,今天我们就来解决一个常见的错误:“Can't bind to local 8602 for debugger”。这个错误通常发生在...
在本文中,我们将深入探讨如何在Windows XP操作系统上使用Eclipse Helios构建和调试U-Boot。U-Boot是一款开源的、广泛使用的微处理器启动加载器,它为各种嵌入式系统提供了启动服务。Eclipse Helios是Eclipse IDE的...
These tricks can simply detect the presence of the debugger, disable the debugger, escape from the control of the debugger, or even exploit a vulnerability in the debugger. The presence of a debugger...
3. **调试器配置**:Eclipse可能配置了GDB调试器或者Keil自己的调试器(如μVision Debugger),使得用户可以直接在Eclipse中进行源码级别的调试。 4. **工程模板**:可能包含了特定于Keil项目的工程模板,方便快速...
在Eclipse中配置C语言开发环境,主要是为了利用其强大的集成开发环境(IDE)特性,进行高效的代码编写、编译、调试。以下是一份详细的步骤指南,帮助你配置Eclipse以进行C语言开发: 1. **下载并安装Eclipse CDT(C...
For example, you can run your programs in the Visual Studio debugger and step into the source code to find bugs, etc. When it is "bug free," you can deploy it in production, starting it from the ...
标题 "Eclipse Flex FlashPlayer Debug 安装" 涉及到的是在开发环境中设置Adobe Flex与Flash Player调试器的过程。这个过程对于Flex开发者来说至关重要,因为它允许他们在Eclipse集成开发环境中对Flash应用程序进行...
《GNU ARM Eclipse Plug-in:为Eclipse开发环境增添ARM支持》 GNU ARM Eclipse Plug-in是专为Eclipse集成开发环境(IDE)设计的一款扩展插件,由开发者ilg-ul和justxi共同贡献。该插件的主要目的是为了在Eclipse...