26

I followed the following tutorial http://developer.android.com/guide/developing/projects/projects-eclipse.html

and I have 2 projects : the starter project and the library project. Most of the source code is located into the library project

When I debug the android application and when I place a breakpoint into the java, the breakpoint work but it jump in the class file located in Library project folder (of the starter project).

I would like to stop in the java code, so I don't have to switch between the source and the compiled code and so modify the source. Is it possible ?

regards

1
  • 1
    AFAIK it isn't possible, because auf the view switch between the android and the java perspective. Even though you assign the right sources to the library, i doesn't work. Anyway, I also would like to know if there is a solution to that... Commented Feb 22, 2012 at 22:11

2 Answers 2

68

Here is what worked for me: (After having clicked debug at least once before)

  • Open the debug view in eclipse (use the menu at the top: Window -> Show View -> Debug)
  • Right click one of the activities in the debug window "Edit source lookup"
  • Click "Add"
  • Select "Java Project"
  • Check the box for the Android Library project
  • Press OK
Sign up to request clarification or add additional context in comments.

1 Comment

I know that "Thanks! Me too!" comments are frowned upon, but this answer surely deserves a "Thanks! Me too!". So... um, thanks. And me too. :)
5

In my case, the solution was:

  • Open the debug view in eclipse (use the menu at the top: Window -> Show View -> Debug)
  • Right click one of the activities in the debug window "Edit source lookup"
  • Check the "Search for duplicate source files on the path"

jhnclvr's aswer lead me to this dialog

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.