Java – the eclipse debugger “skips” important code
•
Java
I have a strange problem debugging Android applications
// Get the puzzles from cache List<PuzzleDetails> newPuzzles = m_cachedPuzzles.getPuzzles(count); if(newPuzzles.size() > 0){ // Remove from cache m_cachedPuzzles.removePuzzles(newPuzzles); // LINE (A) // Add the new puzzles from cache immediately m_ownedPuzzles.addPuzzles(newPuzzles); Log.d("requests","" + newPuzzles.size() + " moved from cache to user"); } int left = count - newPuzzles.size(); String deviceid = ResourcesPublisher.getInstance().getdeviceid(); // Don't let anyone else use these points for Now ChallengePointsManagerImpl.getInstance().usePoints(left); Log.d("requests","aquirePuzzles(" + left + ")"); // Get a list of requests for 'left' number of puzzles RequestList reqList = getRequestList(left); // TODO this is a bug,Now if(reqList.size() > 1){ reqList = getRequestList(left); // LINE (B) }
When I run this code, I step on line (a) M_ cachedPuzzles. removePuzzles(newPuzzles); The debugger "jumps" to the last line (b) reqlist = getrequestlist (left);
A simple check shows that it does skip all code between these lines of code For example, log D (...) has never been called or written
Who can give me a clue why it happened???
thank you!
Solution
Try right clicking > refresh the project displayed on the Project Explorer after compiling the code and before starting debugging
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码