mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Check if the breakpoint belongs to the project before setting.
This commit is contained in:
parent
74a38d9081
commit
4eb6c43261
1 changed files with 11 additions and 1 deletions
|
@ -73,6 +73,7 @@ import org.eclipse.debug.core.model.IExpression;
|
|||
import org.eclipse.debug.core.model.IMemoryBlock;
|
||||
import org.eclipse.debug.core.model.IProcess;
|
||||
import org.eclipse.debug.core.model.IRegisterGroup;
|
||||
import org.eclipse.debug.core.model.ISourceLocator;
|
||||
import org.eclipse.debug.core.model.IThread;
|
||||
|
||||
/**
|
||||
|
@ -351,8 +352,17 @@ public class CDebugTarget extends CDebugElement
|
|||
{
|
||||
if ( !getConfiguration().supportsBreakpoints() )
|
||||
return false;
|
||||
if ( breakpoint instanceof ICBreakpoint )
|
||||
{
|
||||
ISourceLocator sl = getSourceLocator();
|
||||
if ( sl != null && sl instanceof ICSourceLocator )
|
||||
{
|
||||
return ((ICSourceLocator)sl).contains( breakpoint.getMarker().getResource() );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.core.ILaunchListener#launchRemoved(ILaunch)
|
||||
|
|
Loading…
Add table
Reference in a new issue