Debugger: maintenance 2020
06 Feb 2020 | fix debugger ideaPR455 delivers amount of fixes related to the debugger:
fix: breakpoint were not hit if stepping over single line cycle
Code like bellow once stepped over were not breaking anymore.
while(true)
foo(); // breakpoint here
Root case: stepping event was checked before breakpoint one and stepping was reported to JDPW client. Idea skipped this event as line number wasn’t changed.
fixed: debugger crash resolving Thread objects that wasn’t started
Root case: such objects have no native thread attached yet so it was crashing on NPE due missing native thread pointer.
improvement: debugger reports now only line number where breakpoint can be hit
This enables IDE to display invalid breakpoints as on image bellow:
To support this special bit map is generated that specifies if line is valid. As storage bptable
is used. This structure is used by injected hook code to check if there is breakpoint set at specific line. The trick with this enhancement that this structure has bit set for lines where no hook injected.
As result no breakpoint will be triggered by these bits (as there is no corresponding hook code injected) and debugger is know lines without hooks.
improvement: Idea settings: debugger/stepping filter – extended with dalvik.*
, libcore.*
This is done to disable stepping into these class paths similar how stepping into Runtime classes is disabled. As it often stops there when stepping in user code. This can be disable in Idea preferences:
improvement: removed synthetic bro-bridges/bro-callbacks from back-stack entries
These autogenerated and not useful as provides no useful information:
fixed: not working step-out
In case stepping out in method/class that is ignored (like Runtime classes are ignored in Idea stepping settings) debugger should pick up valid not ignored back stack entry. Otherwise step out wasn’t working.
Comments