eclipse 破坏类文件内部

发布于 2024-09-12 20:42:43 字数 2883 浏览 6 评论 0原文

每次我在调试模式下执行我的应用程序时,执行都会在我正在使用的外部库的某些类文件中中断。即使它是一个 NullPointerException,由于某种原因我可以点击恢复并继续执行。如果您好奇,我将堆栈跟踪放在下面。

但我的问题是我只是想阻止它。这非常烦人,并且在执行过程中时不时地发生。但我找不到任何可以防止破坏类文件内部的设置。我该如何避免这种情况?

Thread [main] (Suspended (exception NullPointerException))  
    Transformer.isRuntimeCode(ProtectionDomain) line: 154   
    Transformer.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 81 
    TransformerManager.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 169    
    InstrumentationImpl.transform(ClassLoader, String, Class, ProtectionDomain, byte[], boolean) line: 365  
    Proxy.defineClass0(ClassLoader, String, byte[], int, int) line: not available [native method]   
    Proxy.getProxyClass(ClassLoader, Class<?>...) line: 504 
    ClearCast$CasterImpl<S,T>.constructProxy() line: 349    
    ClearCast$CasterImpl<S,T>.<init>(Class<S>, Class<T>, Options) line: 313 
    ClearCast.compileCaster(Class<S>, Class<T>, Options) line: 219  
    ClearCast.cast(S, Class<T>, Options) line: 231  
    ClearCast.cast(S, Class<T>) line: 241   
    Runtime.<clinit>() line: 32 
    ObjectFactory.newInstance(String, ClassLoader, boolean) line: not available 
    ObjectFactory.findJarServiceProvider(String) line: not available    
    ObjectFactory.createObject(String, String, String) line: not available  
    ObjectFactory.createObject(String, String) line: not available  
    SAXParser.<init>(SymbolTable, XMLGrammarPool) line: not available   
    SAXParser.<init>() line: not available  
    SAXParserImpl.<init>(SAXParserFactory, Hashtable) line: not available   
    SAXParserFactoryImpl.newSAXParser() line: not available 
    XmlParser.setValidating(boolean) line: 93   
    XmlParser.<init>(boolean) line: 83  
    TagLibConfiguration.configureWebApp() line: 210 
    DevAppEngineWebAppContext(WebAppContext).startContext() line: 1247  
    DevAppEngineWebAppContext(ContextHandler).doStart() line: 517   
    DevAppEngineWebAppContext(WebAppContext).doStart() line: 467    
    DevAppEngineWebAppContext(AbstractLifeCycle).start() line: 50   
    JettyContainerService$ApiProxyHandler(HandlerWrapper).doStart() line: 130   
    JettyContainerService$ApiProxyHandler(AbstractLifeCycle).start() line: 50   
    Server(HandlerWrapper).doStart() line: 130  
    Server.doStart() line: 224  
    Server(AbstractLifeCycle).start() line: 50  
    JettyContainerService.startContainer() line: 185    
    JettyContainerService(AbstractContainerService).startup() line: 147 
    DevAppServerImpl.start() line: 219  
    DevAppServerMain$StartAction.apply() line: 164  
    Parser$ParseResult.applyArgs() line: 48 
    DevAppServerMain.<init>(String[]) line: 113 
    DevAppServerMain.main(String[]) line: 89    

Everytime I execute my app in debug mode, the execution breaks inside some class file of an external library that I'm using. Even though it's a NullPointerException, for some reason I can hit resume and continue the execution. In case you're curious, I've put the stacktrace below.

My problem though is that I simply want to stop that. It's extremely annoying and happens every now and then during the execution. But I can't find any setting anywhere which will prevent breaking inside class files. How do I avoid this?

Thread [main] (Suspended (exception NullPointerException))  
    Transformer.isRuntimeCode(ProtectionDomain) line: 154   
    Transformer.transform(ClassLoader, String, Class<?>, ProtectionDomain, byte[]) line: 81 
    TransformerManager.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) line: 169    
    InstrumentationImpl.transform(ClassLoader, String, Class, ProtectionDomain, byte[], boolean) line: 365  
    Proxy.defineClass0(ClassLoader, String, byte[], int, int) line: not available [native method]   
    Proxy.getProxyClass(ClassLoader, Class<?>...) line: 504 
    ClearCast$CasterImpl<S,T>.constructProxy() line: 349    
    ClearCast$CasterImpl<S,T>.<init>(Class<S>, Class<T>, Options) line: 313 
    ClearCast.compileCaster(Class<S>, Class<T>, Options) line: 219  
    ClearCast.cast(S, Class<T>, Options) line: 231  
    ClearCast.cast(S, Class<T>) line: 241   
    Runtime.<clinit>() line: 32 
    ObjectFactory.newInstance(String, ClassLoader, boolean) line: not available 
    ObjectFactory.findJarServiceProvider(String) line: not available    
    ObjectFactory.createObject(String, String, String) line: not available  
    ObjectFactory.createObject(String, String) line: not available  
    SAXParser.<init>(SymbolTable, XMLGrammarPool) line: not available   
    SAXParser.<init>() line: not available  
    SAXParserImpl.<init>(SAXParserFactory, Hashtable) line: not available   
    SAXParserFactoryImpl.newSAXParser() line: not available 
    XmlParser.setValidating(boolean) line: 93   
    XmlParser.<init>(boolean) line: 83  
    TagLibConfiguration.configureWebApp() line: 210 
    DevAppEngineWebAppContext(WebAppContext).startContext() line: 1247  
    DevAppEngineWebAppContext(ContextHandler).doStart() line: 517   
    DevAppEngineWebAppContext(WebAppContext).doStart() line: 467    
    DevAppEngineWebAppContext(AbstractLifeCycle).start() line: 50   
    JettyContainerService$ApiProxyHandler(HandlerWrapper).doStart() line: 130   
    JettyContainerService$ApiProxyHandler(AbstractLifeCycle).start() line: 50   
    Server(HandlerWrapper).doStart() line: 130  
    Server.doStart() line: 224  
    Server(AbstractLifeCycle).start() line: 50  
    JettyContainerService.startContainer() line: 185    
    JettyContainerService(AbstractContainerService).startup() line: 147 
    DevAppServerImpl.start() line: 219  
    DevAppServerMain$StartAction.apply() line: 164  
    Parser$ParseResult.applyArgs() line: 48 
    DevAppServerMain.<init>(String[]) line: 113 
    DevAppServerMain.main(String[]) line: 89    

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧话新听 2024-09-19 20:42:43

如果您已在 NullPointerException 或超类上添加了显式断点,那么您似乎可以:

  1. 显示 Breakpoints 视图。
  2. 右键单击断点。
  3. 选择上下文菜单项“断点属性”。
  4. 单击左侧列表中的“过滤”项。
  5. 在“限制到选定位置”字段中,添加排除项。

此外,在“Java> 调试”下的“首选项”中,有一个用于停止未捕获的异常的全局设置。

If you've added an explicit breakpoint on NullPointerException or a superclass, then it looks as if you can:

  1. Show the Breakpoints view.
  2. Right-click on the breakpoint.
  3. Choose context-menu-item "Breakpoint Properties."
  4. Click on the "Filtering" item in the list on the left.
  5. In the "Restrict to Selected Location(s)" field, add an exclusion.

Also, there's a global setting for stopping on uncaught exceptions in Preferences under Java>Debug.

紫﹏色ふ单纯 2024-09-19 20:42:43

我会更担心修复 NPE。如果可能的话,下载并附上源代码。

I would be more worried about fixing the NPE. Download and attach the source if possible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文