Tricks to encourage IJ 12 to stop at breakpoints?

Hi,
  I have breakpoints working in some java classes in  a project, other breakpoints (also in java) are ignored by IJ.  

I have print statements all over the place around the ones that are not stopping. I have done a bunch of things:

invalidate caches
restart ij (more than once)
rebuild project
add more print statements to be sure compiling properly.

I would really like to get the debugger working in those other classes.  Are there known issues about not stopping at breakpoints in the latest ij builds? Workarounds?

thx

stephenb

8 comments

Hi Stephen,

Please make sure that you don't have the same problem as discussed here.

Denis

0

Hi Denis,
thanks for looking at this.

I did see that error: i'm not even using maven, let alone the specific issue.. Let me explain:  breakpoints had been working, then they stopped working.  The red circles DO show up (not with X on them) .  This is a single threaded local hadoop debugging on 1.0.3 sources.  The JobClient is debugging ok but then the breakpoints in the mapper do not get recognized.

I have printed out the name of the thread in the mapper: it is "main": that tells me that yes this is running single threaded and in same process.  Also as mentioned, the mapper had been properly stopping at breakpoints and then that stopped working.

thanks

stephenb

0

Can you provide a sample project which illustrates the problem?

Denis

0

Hi,
I found the problem.  I had been running hadoop in local mode: but some change I made to the configuration caused it to change from local to pseudo-distributed.  The latter causes starting the mapper/reducer tasks in separate threads: thus the debugger would naturally not stop.  

So thankfully, this is not an Ij problem it was my mistake. After correcting the hadoop config the debugging is working perfectly.

stephen b

0

Can you provide more details on how multi-threaded environment affected breakpoints 'hitability'? I'm asking because the described scenario ('The latter causes starting the mapper/reducer tasks in separate threads: thus the debugger would naturally not stop') is a pretty normal one, i.e. jvm debugger api is assumed to correctly handle such a situation.

Denis

0

Hi Denis,  

I was writing imprecisely . Hadoop is actually starting separate processes not separate threads. Thus why the breakpoints are skipped.

So IJ is doing the right thing here.

stephenb

0

Ok, thanks for the clarification

Denis

0

One more note - there is a probable case that a breakpoint is not hit even in case of a single process:

  1. Two breakpoints with suspend policy All are set ;
  2. One of them is hit and 'Step ...' action is performed (e.g. 'Step Over' action);
  3. The IDE suspends breakpoints from all threads instead of the one which hit the breakpoint above until 'Step ...' action is finished then;

I.e. there is a possible case that another thread hits particular breakpoint during 'Step ...' action processing and the IDE will not stop there then.

I've created corresponding documentation enhancement request for that - DOC-2953.

Denis

0

Please sign in to leave a comment.