Bug 495861 - improving debugging lambdas(or any code sequence) within streams
Summary: improving debugging lambdas(or any code sequence) within streams
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-10 06:16 EDT by Joël DRIGO CLA
Modified: 2023-08-22 13:12 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joël DRIGO CLA 2016-06-10 06:16:01 EDT
Hi!

Debugging Java 8 streams could be tricky and I would like to call for proposals and implementing something to help it.

My ideas are :
- could be able to add break point into the stream method parameter.
By exemple :
stream.filter(s-> somePredicate(s))
      .map([put a breakpoint here]String::toUpperCase)
      .collect(/*something...*/)

- hide stream internal stacktrace code (like pipelines), or highlight my code and lambdas in debugging stacktrace
Comment 1 Joël DRIGO CLA 2016-06-10 08:52:50 EDT
Patrik, I added you in CC
Comment 2 Stefan Winkler CLA 2017-06-02 07:21:29 EDT
An addition for the idea list:

I recently noticed that JetBrains has a Stream Debugging feature under development which looks interesting: https://plugins.jetbrains.com/plugin/9696-java-stream-debugger

I haven't tried it but judging from the screenshots this is definitely something I'd like to have in Eclipse, too ;-)

I don't know, however, how they do it internally. Particularly, if you have streams which are not cloneable/reiterable (such as Stream.generate(Math::random)), inspection might be a problem...
Comment 3 Beirti O 'Nunain CLA 2019-01-08 05:23:32 EST
*Walks past
*Stops
*Turns around
*Thinks "WHY IS NOBODY TALKING ABOUT THIS?!"
*Goes back to System.out.print
Comment 4 Gayan Perera CLA 2019-01-13 11:37:55 EST
Why this bus is not getting any attention for 2 years ? is it that no eclipse users are using eclipse for debugging lamdas ? or is it that eclipse is just ignoring the support for java 8 lambda debugging and expect the user to use peek() or sysout ?
Comment 5 Vincenzo Caselli CLA 2019-10-12 10:19:03 EDT
Hi,
nowadays this is a major priority for a Java developer.
Please JDT Team give us some feedback: we would really like to keep using Eclipse, but cannot blame those among us moving to IntelliJ for such basic missing features.
Comment 6 Gayan Perera CLA 2019-10-13 03:40:46 EDT
@Vincenzo 
With latest version of Eclipse you should be able to debug streams lambda by just putting a debug point to the line. it will break on each lambda expression. I know that IJ has better support on putting a debug point just for a single lambda expression in a stream expression. But still eclipse can be used to debug, some time when you want to break on each lambda expression to see how the stream is processing in each operation Eclipse way is better. But of course Eclipse can improve more on this area. because of these lacking improvements developers move to IJ including me :), i agree with you on that.
Comment 7 Eclipse Genie CLA 2023-08-22 13:12:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.