如何在eclipse中设置spring源代码进行调试 [英] How to set up spring source code for debugging in eclipse

查看:799
本文介绍了如何在eclipse中设置spring源代码进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在eclipse项目中设置spring源代码,以便我可以用调试器来完成它。

I'm trying to set up the spring source code in an eclipse project so that I can step through it with the debugger.

目前,我试图进入的特定代码行是这样的:

Currently, the specific line of code I'm trying to step into is this one:

ApplicationContext context=new ClassPathXmlApplicationContext("classpath:spring.xml");

ApplicationContext和ClassPathXmlApplicationContext是org.springframework.context的一部分:

ApplicationContext and ClassPathXmlApplicationContext are part of org.springframework.context:

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

在Java Build Path=>库下,我指定了文件的路径org.springframework.context-sources-3.1.3.RELEASE.jar for org.springframework.context-3.1.3.RELEASE.jar。

Under "Java Build Path"=>"Libraries", I've specified the path to the file org.springframework.context-sources-3.1.3.RELEASE.jar for org.springframework.context-3.1.3.RELEASE.jar.

我正在使用3.1.3与eclipse靛蓝3.7.2。

I'm using spring 3.1.3 with eclipse indigo 3.7.2.

更新:

我尝试添加。 jar文件到源代码选项卡的调试配置下,但eclipse仍然没有找到源代码。

I tried adding the sources.jar files to the source tab under "Debug Configurations" but eclipse is still not finding the source.

推荐答案

请尝试下面:

Menu Option Run -> Debug Configurations -> Java Application 
   Provide required inputs in "main" tab
   Add source jar file in source tab

按OK并运行这个新创建的选项进行调试。

Press OK and run this newly created option to debug.

如果运行远程,请选择远程Java应用程序在调试配置的左窗格中。

If running remote, then select Remote Java Application in debug configuration's left pane.

这篇关于如何在eclipse中设置spring源代码进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆