IntelliJ idea 调试stream流 debug技巧

工作中使用到jdk8 中的Stream 流,需要调试其执行过程中的数据,可以使用下面方法:

public static void main(String[] args) {

List collect = Stream.of(1, 2, 3, 4, 5, 6).filter(integer ->

integer >3).collect(Collectors.toList());

collect.forEach(System.out::println);

}

进入debug模式,选择下面按钮

IntelliJ idea 调试stream流 debug技巧

进入stream流调试:

点击相应按钮,执行对应动作,调试

IntelliJ idea 调试stream流 debug技巧


分享到:


相關文章: