Oct 12, 2013

Eclipse Breakpoint Is Not Hit

Today I was debugging a Java web application, and I met a strange problem:

In the javascript side, it is written in this way:
 var helpers = { 
 executeQuery: function(a) {               
  var param = {sQuery : a.sqlquery, sTitle: ""};
  REST.postObject('resources/whiteboardsql/executeQuery/'+a.instanceId+"/"+a.timestamp,param, a);
 }

And in the java side, I am sure that the code below it the rest call will invoke, so that I set a breakpoint there. But what's weird is that I executed the rest call many times but the breakpoint is never hit.

Finally I figured out the reason, it is so simply but I would like to share with those who might experience the same scenario.
The reason is "Hot Code Replace Failed"

I was modified the program, and the modification was deleting a comment, but eclipse pops up the "Hot Code Replace Failed" dialog. And I clicked "Continue".

Then when I come to debug the problem, the breakpoint is not hit. Terminate and restart the application solves the problem.

If you think this article is useful, please click the ads on this page to help. Thank you very much.

No comments: