Eclipse调试不能进入断点

本文解决在Eclipse中遇到的调试错误,包括配置Ant编译器、检查编译器设置以及编译项目的步骤。主要内容分为三个部分:确保Ant编译时开启debug模式、确认编译器设置生成行号属性、以及正确编译项目解决错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Eclipse下在给行设置断点或者在调试时弹出错误“Unable to install breakpoint due to missing line number attributes,Modify compiler options to generate line number attributes"

这个错误找到的解答方案汇总:
1、使用Ant编译时,未打开debug开关,在写javac 任务时确认debug=true,否则不能调试。THe settings for the eclipse compiler don't affect the ant build and even if you launch the ant build from within eclipse. ant controls it's own compiler settings.you can tell ant to generate debugging info like this 'javac ... debug="true".../>(我的问题是因为这个原因);
2、编译器的设置问 题,window->preferences->java->Compiler在compiler起始页,classfile Generation区域中确认已经勾选了All line number attributes to generated class files。如果已经勾选,从新来一下再Apply一下。或者从项目层次进行设定,项目属性->java compiler同样在起始页,确定已经勾选

其次如果以上两点都没有问题,那么你将项目编译(Build)一下,最好是Build project all,因为出现这个问题有时候是你在Workpence中添加了新的项目。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值