如何在eclipse中设置spring源代码进行调试

我正在尝试在eclipse项目中设置spring源代码,以便我可以使用调试器逐步完成它。

目前,我试图介入的具体代码行是这样的:

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

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

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

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

在此处输入图像描述

我正在使用带有eclipse indigo 3.7.2的spring 3.1.3。

更新:

我尝试将 .jar文件添加到“调试配置”下的源选项卡,但是eclipse仍然没有找到源。

在此处输入图像描述

试试以下:

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

按确定并运行此新创建的选项进行调试。

如果正在运行remote,则在调试配置的左窗格中选择Remote Java Application