简体   繁体   English

Eclipse无法启动Debug As

[英]Eclipse cannot start Debug As

I am working on Java project in Eclipse. 我正在Eclipse中进行Java项目。 I can start application (Run As ) and i works fine, but I cannot start Debug As ( I could start Debug As but suddenly I cannot anymore ). 我可以启动应用程序(运行方式为),并且运行良好,但是我无法启动调试方式(我可以启动调试方式,但突然我不能了)。 Does anybody have experience with this weird stuff ? 有人对这种奇怪的东西有经验吗?


@dimitrisil in debug console 调试控制台中的@dimitrisil

MainWindow (1) [Java Application]   
    com.euroicc.histo.view.MainWindow at localhost:4325 
        Thread [AWT-Shutdown] (Running) 
        Daemon Thread [AWT-Windows] (Running)   
        Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
            Integer.parseInt(String, int) line: not available   
            Integer.<init>(String) line: not available  
            InetAddressCachePolicy.<clinit>() line: not available   
            InetAddress$Cache.getPolicy() line: not available   
            InetAddress$Cache.put(String, Object) line: not available   
            InetAddress.cacheInitIfNeeded() line: not available 
            InetAddress.cacheAddress(String, Object, boolean) line: not available   
            InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
            InetAddress.getLocalHost() line: not available  
            SeedGenerator$1.run() line: not available   
            AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
            SeedGenerator.getSystemEntropy() line: not available    
            SecureRandom.engineNextBytes(byte[]) line: not available    
            SecureRandom.nextBytes(byte[]) line: not available  
            SecureRandom.next(int) line: not available  
            SecureRandom(Random).nextLong() line: not available 
            File.generateFile(String, String, File) line: not available 
            File.createTempFile(String, String, File) line: not available   
            FileCacheImageInputStream.<init>(InputStream, File) line: not available 
            InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available 
            ImageIO.createImageInputStream(Object) line: not available  
            ImageIO.read(URL) line: not available   
            BrushedMetalDecorationPainter.<init>() line: 69 
            BusinessBlackSteelSkin.<init>() line: 135   
            SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54    
            MainWindow$7.run() line: 238    
            InvocationEvent.dispatch() line: not available  
            EventQueue.dispatchEvent(AWTEvent) line: not available  
            EventDispatchThread.pumpOneEventForFilters(int) line: not available 
            EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
            EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
            EventDispatchThread.pumpEvents(int, Conditional) line: not available    
            EventDispatchThread.pumpEvents(Conditional) line: not available 
            EventDispatchThread.run() line: not available   
        Thread [DestroyJavaVM] (Running)    
    C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.00.45)  
MainWindow (1) [Java Application]   
    com.euroicc.histo.view.MainWindow at localhost:4363 
        Thread [AWT-Shutdown] (Running) 
        Daemon Thread [AWT-Windows] (Running)   
        Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
            Integer.parseInt(String, int) line: not available   
            Integer.<init>(String) line: not available  
            InetAddressCachePolicy.<clinit>() line: not available   
            InetAddress$Cache.getPolicy() line: not available   
            InetAddress$Cache.put(String, Object) line: not available   
            InetAddress.cacheInitIfNeeded() line: not available 
            InetAddress.cacheAddress(String, Object, boolean) line: not available   
            InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
            InetAddress.getLocalHost() line: not available  
            SeedGenerator$1.run() line: not available   
            AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
            SeedGenerator.getSystemEntropy() line: not available    
            SecureRandom.engineNextBytes(byte[]) line: not available    
            SecureRandom.nextBytes(byte[]) line: not available  
            SecureRandom.next(int) line: not available  
            SecureRandom(Random).nextLong() line: not available 
            File.generateFile(String, String, File) line: not available 
            File.createTempFile(String, String, File) line: not available   
            FileCacheImageInputStream.<init>(InputStream, File) line: not available 
            InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available 
            ImageIO.createImageInputStream(Object) line: not available  
            ImageIO.read(URL) line: not available   
            BrushedMetalDecorationPainter.<init>() line: 69 
            BusinessBlackSteelSkin.<init>() line: 135   
            SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54    
            MainWindow$7.run() line: 238    
            InvocationEvent.dispatch() line: not available  
            EventQueue.dispatchEvent(AWTEvent) line: not available  
            EventDispatchThread.pumpOneEventForFilters(int) line: not available 
            EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
            EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
            EventDispatchThread.pumpEvents(int, Conditional) line: not available    
            EventDispatchThread.pumpEvents(Conditional) line: not available 
            EventDispatchThread.run() line: not available   
        Thread [DestroyJavaVM] (Running)    
    C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.01.06)  
MainWindow (1) [Java Application]   
    com.euroicc.histo.view.MainWindow at localhost:4369 
        Thread [AWT-Shutdown] (Running) 
        Daemon Thread [AWT-Windows] (Running)   
        Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
            Integer.parseInt(String, int) line: not available   
            Integer.<init>(String) line: not available  
            InetAddressCachePolicy.<clinit>() line: not available   
            InetAddress$Cache.getPolicy() line: not available   
            InetAddress$Cache.put(String, Object) line: not available   
            InetAddress.cacheInitIfNeeded() line: not available 
            InetAddress.cacheAddress(String, Object, boolean) line: not available   
            InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
            InetAddress.getLocalHost() line: not available  
            SeedGenerator$1.run() line: not available   
            AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
            SeedGenerator.getSystemEntropy() line: not available    
            SecureRandom.engineNextBytes(byte[]) line: not available    
            SecureRandom.nextBytes(byte[]) line: not available  
            SecureRandom.next(int) line: not available  
            SecureRandom(Random).nextLong() line: not available 
            File.generateFile(String, String, File) line: not available 
            File.createTempFile(String, String, File) line: not available   
            FileCacheImageInputStream.<init>(InputStream, File) line: not available 
            InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available 
            ImageIO.createImageInputStream(Object) line: not available  
            ImageIO.read(URL) line: not available   
            BrushedMetalDecorationPainter.<init>() line: 69 
            BusinessBlackSteelSkin.<init>() line: 135   
            SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54    
            MainWindow$7.run() line: 238    
            InvocationEvent.dispatch() line: not available  
            EventQueue.dispatchEvent(AWTEvent) line: not available  
            EventDispatchThread.pumpOneEventForFilters(int) line: not available 
            EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
            EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
            EventDispatchThread.pumpEvents(int, Conditional) line: not available    
            EventDispatchThread.pumpEvents(Conditional) line: not available 
            EventDispatchThread.run() line: not available   
        Thread [DestroyJavaVM] (Running)    
    C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.01.30)  
MainWindow (1) [Java Application]   
    com.euroicc.histo.view.MainWindow at localhost:4383 
        Thread [AWT-Shutdown] (Running) 
        Daemon Thread [AWT-Windows] (Running)   
        Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
            Integer.parseInt(String, int) line: not available   
            Integer.<init>(String) line: not available  
            InetAddressCachePolicy.<clinit>() line: not available   
            InetAddress$Cache.getPolicy() line: not available   
            InetAddress$Cache.put(String, Object) line: not available   
            InetAddress.cacheInitIfNeeded() line: not available 
            InetAddress.cacheAddress(String, Object, boolean) line: not available   
            InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
            InetAddress.getLocalHost() line: not available  
            SeedGenerator$1.run() line: not available   
            AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
            SeedGenerator.getSystemEntropy() line: not available    
            SecureRandom.engineNextBytes(byte[]) line: not available    
            SecureRandom.nextBytes(byte[]) line: not available  
            SecureRandom.next(int) line: not available  
            SecureRandom(Random).nextLong() line: not available 
            File.generateFile(String, String, File) line: not available 
            File.createTempFile(String, String, File) line: not available   
            FileCacheImageInputStream.<init>(InputStream, File) line: not available 
            InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available 
            ImageIO.createImageInputStream(Object) line: not available  
            ImageIO.read(URL) line: not available   
            BrushedMetalDecorationPainter.<init>() line: 69 
            BusinessBlackSteelSkin.<init>() line: 135   
            SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54    
            MainWindow$7.run() line: 238    
            InvocationEvent.dispatch() line: not available  
            EventQueue.dispatchEvent(AWTEvent) line: not available  
            EventDispatchThread.pumpOneEventForFilters(int) line: not available 
            EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
            EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
            EventDispatchThread.pumpEvents(int, Conditional) line: not available    
            EventDispatchThread.pumpEvents(Conditional) line: not available 
            EventDispatchThread.run() line: not available   
        Thread [DestroyJavaVM] (Running)    
    C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.05.23)  
MainWindow (1) [Java Application]   
    com.euroicc.histo.view.MainWindow at localhost:2740 
        Thread [AWT-Shutdown] (Running) 
        Daemon Thread [AWT-Windows] (Running)   
        Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
            Integer.parseInt(String, int) line: not available   
            Integer.<init>(String) line: not available  
            InetAddressCachePolicy.<clinit>() line: not available   
            InetAddress$Cache.getPolicy() line: not available   
            InetAddress$Cache.put(String, Object) line: not available   
            InetAddress.cacheInitIfNeeded() line: not available 
            InetAddress.cacheAddress(String, Object, boolean) line: not available   
            InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
            InetAddress.getLocalHost() line: not available  
            SeedGenerator$1.run() line: not available   
            AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
            SeedGenerator.getSystemEntropy() line: not available    
            SecureRandom.engineNextBytes(byte[]) line: not available    
            SecureRandom.nextBytes(byte[]) line: not available  
            SecureRandom.next(int) line: not available  
            SecureRandom(Random).nextLong() line: not available 
            File.generateFile(String, String, File) line: not available 
            File.createTempFile(String, String, File) line: not available   
            FileCacheImageInputStream.<init>(InputStream, File) line: not available 
            InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available 
            ImageIO.createImageInputStream(Object) line: not available  
            ImageIO.read(URL) line: not available   
            BrushedMetalDecorationPainter.<init>() line: 69 
            BusinessBlackSteelSkin.<init>() line: 135   
            SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54    
            MainWindow$7.run() line: 238    
            InvocationEvent.dispatch() line: not available  
            EventQueue.dispatchEvent(AWTEvent) line: not available  
            EventDispatchThread.pumpOneEventForFilters(int) line: not available 
            EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
            EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
            EventDispatchThread.pumpEvents(int, Conditional) line: not available    
            EventDispatchThread.pumpEvents(Conditional) line: not available 
            EventDispatchThread.run() line: not available   
        Thread [DestroyJavaVM] (Running)    
    C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 16.17.11)  
MainWindow (1) [Java Application]   
    com.euroicc.histo.view.MainWindow at localhost:2926 
        Thread [AWT-Shutdown] (Running) 
        Daemon Thread [AWT-Windows] (Running)   
        Thread [DestroyJavaVM] (Running)    
        Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException)) 
            Integer.parseInt(String, int) line: not available   
            Integer.<init>(String) line: not available  
            InetAddressCachePolicy.<clinit>() line: not available   
            InetAddress$Cache.getPolicy() line: not available   
            InetAddress$Cache.put(String, Object) line: not available   
            InetAddress.cacheInitIfNeeded() line: not available 
            InetAddress.cacheAddress(String, Object, boolean) line: not available   
            InetAddress.getAddressFromNameService(String, InetAddress) line: not available  
            InetAddress.getLocalHost() line: not available  
            SeedGenerator$1.run() line: not available   
            AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]  
            SeedGenerator.getSystemEntropy() line: not available    
            SecureRandom.engineNextBytes(byte[]) line: not available    
            SecureRandom.nextBytes(byte[]) line: not available  
            SecureRandom.next(int) line: not available  
            SecureRandom(Random).nextLong() line: not available 
            File.generateFile(String, String, File) line: not available 
            File.createTempFile(String, String, File) line: not available   
            FileCacheImageInputStream.<init>(InputStream, File) line: not available 
            InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available 
            ImageIO.createImageInputStream(Object) line: not available  
            ImageIO.read(URL) line: not available   
            BrushedMetalDecorationPainter.<init>() line: 69 
            BusinessBlackSteelSkin.<init>() line: 135   
            SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54    
            MainWindow$7.run() line: 238    
            InvocationEvent.dispatch() line: not available  
            EventQueue.dispatchEvent(AWTEvent) line: not available  
            EventDispatchThread.pumpOneEventForFilters(int) line: not available 
            EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available  
            EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available 
            EventDispatchThread.pumpEvents(int, Conditional) line: not available    
            EventDispatchThread.pumpEvents(Conditional) line: not available 
            EventDispatchThread.run() line: not available   
    C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 16.37.37)  

I have seen those two menus become separately confused about their target. 我已经看到了这两个菜单分别针对其目标感到困惑。 For example, for an Ant buildfile, one will continue to be titled "Run As>Ant Build" and the other will be titled something else, and fail. 例如,对于一个Ant构建文件,一个将继续命名为“ Run As> Ant Build”,另一个将被命名为其他名称,并且失败。

Restarting Eclipse has always solved the problem. 重新启动Eclipse始终可以解决该问题。

Based on the (poorly formatted) answer that really ought to be part of the question, it looks like you might have a malformed socket address. 根据确实应该是问题一部分的(格式错误的)答案,您似乎有一个错误的套接字地址。

The NumberFormatException is repeated over and over again, in regards to INetAddress.getLocalhost... 关于INetAddress.getLocalhost ...,反复重复NumberFormatException。

Ah! 啊! Do you have IPv4 or IPv6? 您有IPv4或IPv6吗? If a v4 (decimal) interpreter tried to parse a v6 (hex) address, things could get mangled. 如果v4(十进制)解释器尝试解析v6(十六进制)地址,则可能会造成混乱。

It could also be that your debug socket number isn't a number (at least not a decimal one)... but I don't see anywhere in the UI to adjust this so I don't see how you could have broken it. 也可能是您的调试套接字号不是数字(至少不是十进制数)...但是我在用户界面中看不到任何地方可以对此进行调整,因此我看不到如何破坏它。

Just for the case someone will get to the same problem in future. 以防万一,将来有人会遇到相同的问题。 Recently I was fooled by the same use-case (however in NetBeans) - the problem was caused by the breakpoint on java.lang.IllegalArgumentException I've created some time ago and forgot about it, so IDE was stopping all the time somewhere in the Java core code just because of that breakpoint, but I was thinking it was caused by something in my code or run-time environment :( 最近,我被同一个用例(但是在NetBeans中)所迷惑-问题是由我在一段时间之前创建并忘记了它的java.lang.IllegalArgumentException上的断点引起的,所以IDE一直在Java核心代码只是因为该断点,但是我认为它是由我的代码或运行时环境中的某些东西引起的:(

Actually, I would say that this problem is in general coding style in core Java libraries. 实际上,我会说这个问题是核心Java库中的一般编码风格。 There are to many places where exceptions are thrown in the cases where if() condition would be more appropriate and this causes major problem in debugging of Exceptions - there are just too many of them. 在许多情况下,如果if()条件更合适,则会引发异常,这会在调试异常时引起重大问题-异常太多。 In that particular case problem it is caused by the following lines (I took sources of InetAddressCachePolicy from here http://download.java.net/openjdk/jdk6/ ): 在这种特殊情况下,它是由以下几行引起的(我从此处http://download.java.net/openjdk/jdk6/获取了InetAddressCachePolicy的源代码):

    try {
        tmp = new Integer(
          java.security.AccessController.doPrivileged (
            new PrivilegedAction<String>() {
              public String run() {
                  return Security.getProperty(cachePolicyProp);
              }
          }));
    } catch (NumberFormatException e) {
        // ignore
    }

You may notice that someone who wrote the code was aware about potential 'not-a-number' String provided in configuration, but did not try to handle more elegantly at least cases of String is null or empty, which is actually the case for that problem. 您可能会注意到,编写该代码的人知道配置中提供了潜在的“非数字”字符串,但至少没有更好地处理String的情况为null或为空,实际上就是这种情况问题。

There is relevant discussion about Integer.parseInt() here - Java: Good way to encapsulate Integer.parseInt() 这里有关于Integer.parseInt()的相关讨论-Java:封装Integer.parseInt()的好方法

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

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