Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 466442

Summary: The stepFilters extension point does not seem to work
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Michael_Rennie
Version: 4.5   
Target Milestone: 4.5 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Dani Megert CLA 2015-05-05 10:17:19 EDT
4.5 M7.

The stepFilters extension point does not seem to work.

1. add this extension:
   <extension
         point="org.eclipse.debug.core.stepFilters">
      <stepFilter
            class="org.eclipse.debug.tests.stepfilters.TestStepFilter"
            modelIdentifier="org.eclipse.jdt.debug">
      </stepFilter>
   </extension>   

2. modify 'TestStepFilter' to always return 'true' and put a breakpoint there

3. start to debug a new target workspace

4. paste this into 'Package Explorer':
	public static void main(String[] args) {
		System.out.println();
		System.out.println();
		System.out.println();
	}

5. put a breakpoint on first line

6. enable step filtering and disable all other filters

7. start debugging
   ==> stops at breakpoint on first line

8. click 'Step Into'
   ==> breakpoint in dev workspace is hit: 'true' is returned - resume

Now, I would expect that it goes to line two, but instead it steps into #println
Comment 1 Dani Megert CLA 2015-05-05 10:17:47 EDT
Mike can you have a look since you've added that feature?
Comment 2 Dani Megert CLA 2015-05-05 11:07:41 EDT
IMPORTANT NOTE: Close all Debug test projects as they also contribute step filters.


See also bug 466442 where the contributed filter disables the JDT filters.
Comment 3 Dani Megert CLA 2015-05-12 04:43:21 EDT
Mike we have our last RC1 build tomorrow evening.
Comment 4 Michael Rennie CLA 2015-05-12 10:27:59 EDT
This bug is not valid for platform debug: the steps are JDT specific, and the extension point loads, is accessible just fine from platform debug - i.e. there is no implementation of using the filters in platform debug, only defining  / accessing.

Closing invalid.
Comment 5 Dani Megert CLA 2015-05-12 10:31:54 EDT
(In reply to Michael Rennie from comment #4)
> This bug is not valid for platform debug: the steps are JDT specific, and
> the extension point loads, is accessible just fine from platform debug -
> i.e. there is no implementation of using the filters in platform debug, only
> defining  / accessing.
> 
> Closing invalid.

Do you have a real client which can confirm that this really works? Tests don't count.
Comment 6 Michael Rennie CLA 2015-05-12 11:03:54 EDT
(In reply to Dani Megert from comment #5)
> (In reply to Michael Rennie from comment #4)
> > This bug is not valid for platform debug: the steps are JDT specific, and
> > the extension point loads, is accessible just fine from platform debug -
> > i.e. there is no implementation of using the filters in platform debug, only
> > defining  / accessing.
> > 
> > Closing invalid.
> 
> Do you have a real client which can confirm that this really works? Tests
> don't count.

Yes, JDT debug. It uses the only code from platform debug that deals with the step filters: org.eclipse.debug.core.DebugPlugin.getStepFilters(String).

As I said, the filters are not used at all in platform debug, only specified there.
Comment 7 Dani Megert CLA 2015-05-12 11:09:39 EDT
This is funny: your fix for bug 466452 actually fixes this problem.

I don't see what's invalid with the provided example. Step filters can be contributed by and Debug client.
Comment 8 Dani Megert CLA 2015-05-12 11:10:52 EDT
Then let's move the bug to JDT Debug, since it's clearly a valid scenario.
Comment 9 Dani Megert CLA 2015-05-12 11:14:06 EDT
We can probably mark this as duplicate of 466452.
Comment 10 Michael Rennie CLA 2015-05-12 13:48:48 EDT

*** This bug has been marked as a duplicate of bug 466452 ***