7

デバッガーでステップスルーできるように、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 はまだソースを見つけられません。

ここに画像の説明を入力

4

2 に答える 2

1

以下を試してください:

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

[OK] を押して、この新しく作成されたオプションを実行してデバッグします。

リモートで実行している場合Remote Java Applicationは、デバッグ構成の左ペインで選択します。

于 2012-11-11T19:59:07.210 に答える