Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJordan Peterson
5,134 PointsDebugger not working!
I'm trying to debug my Crystal Ball app and when I click the step over button or the resume button it says "Source not found". I'm not really sure what to do. Is anyone able to help me with this problem?
1 Answer
Joe Steele
10,721 PointsHey Jordan Peterson, that's pretty common when debugging. While debugging, you can step through the code as it's executed, even code that you didn't write, like other libraries or even the Android framework code itself.
When you see the "Sources not found" message, the IDE (e.g. Android Studio or Eclipse) is telling you it doesn't know about the actual source code for the file you have open (and is likely displaying a stub of the class with the structure of the class and its functions, but not the function definitions).
If this file belongs to a library and you only have the jar, you might not be able to do anything about it. But, in other cases, like with the Android framework code or a library where you have the actual source code on your computer somewhere, you can "attach sources" and browse to the location on your computer where they exist and select them. This tells your IDE where to look when trying to display the source code for a given file.
Joe Steele
10,721 PointsJoe Steele
10,721 PointsAn example of the "Sources not found" when debugging and stepping through code that the IDE doesn't know the sources for:
Jordan Peterson
5,134 PointsJordan Peterson
5,134 PointsThank you! It's working now.