How to debug stream().map(…) with lambda expressions?

前端 未结 6 1750
一向
一向 2020-12-02 05:28

In our project we are migrating to java 8 and we are testing the new features of it.

On my project I\'m using Guava predicates and functions to filter and transform

6条回答
  •  时光取名叫无心
    2020-12-02 06:08

    Just to provide more updated details (Oct 2019), IntelliJ has added a pretty nice integration to debug this type of code that is extremely useful.

    When we stop at a line that contains a lambda if we press F7 (step into) then IntelliJ will highlight what will be the snippet to debug. We can switch what chunk to debug with Tab and once we decided it then we click F7 again.

    Here some screenshots to illustrate:

    1- Press F7 (step into) key, will display the highlights (or selection mode)

    2- Use Tab multiple times to select the snippet to debug

    3- Press F7 (step into) key to step into

提交回复
热议问题