简体   繁体   English

在Eclipse中进行调试。 将变量提取到Excel工作表

[英]Debugging in eclipse . Extract variables to excel sheet

Am debugging my application using eclipse. 我正在使用eclipse调试我的应用程序。 I have a list which has 100 objects within it. 我有一个列表,其中包含100个对象。 I need to extract the values of those hundred objects in to an excel sheet in debug-window and i should compare. 我需要将这一百个对象的值提取到调试窗口中的excel工作表 ,我应该进行比较。 Is there anyway in eclipse I can do it while debugging ?? 无论如何,在调试中我可以做到吗?

Right now, I wrote a program which will write in to an excel and am doing it which is very painful as I have to delete that code before moving it to production. 现在,我编写了一个程序,该程序将写入excel并正在执行它,这非常痛苦,因为在将其移至生产之前必须删除该代码。

It would be good, if the debug plug-in itself has an option for this . 如果调试插件本身对此提供了一个选项,那就太好了。 can this be done ? 能做到吗?

This will reduce our analysis timing 这将减少我们的分析时间

You can execute code during debug in eclipse Display View Go to Window -> Show View -> Display View 您可以在Eclipse中的debug期间执行代码debug View转到Window -> Show View -> Display View

You can write code to see the value of the expressions during debugging, you should be able to write code to extract values into excel. 您可以编写代码以在调试过程中查看表达式的值,您应该能够编写代码以将值提取到excel中。

If your issue is that you have to remove the code before going in to production then a simple way to avoid this is to use the log levels for your logger. 如果您的问题是您必须在进入生产之前删除代码,那么避免这种情况的一种简单方法是使用记录器的日志级别。 For example: 例如:

if (logger.isDebugEnabled()) {
  // Your debug code
}

In your production code your log level is above debug , so the code won't be called. 在生产代码中,您的日志级别高于debug ,因此不会调用该代码。

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

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