Source:
public void addBreakpoint(Breakpoint breakpoint) throws DebuggerException { final String className = debuggerUtil.findFqnByPosition(breakpoint.getLocation()); final int lineNumber = breakpoint.getLocation().getLineNumber(); List<ReferenceType> classes = vm.classesByName(className); if (classes.isEmpty()) { deferBreakpoint(className, breakpoint); throw new DebuggerException("Class not loaded"); } ReferenceType clazz = classes.get(0); List<com.sun.jdi.Location> locations; try { locations = clazz.locationsOfLine(lineNumber); } catch (AbsentInformationException | ClassNotPreparedException e) { throw new DebuggerException(e.getMessage(), e); } if (locations.isEmpty()) { throw new DebuggerException("Line " + lineNumber + " not found in class " + className); } com.sun.jdi.Location location = locations.get(0); if (location.method() == null) { throw new DebuggerException("Invalid line " + lineNumber + " in class " + className); } EventRequestManager requestManager = getEventManager(); for (BreakpointRequest breakpointRequest : requestManager.breakpointRequests()) { if (location.equals(breakpointRequest.location())) { LOG.debug("Breakpoint at already set", location); return; } } try { EventRequest breakPointRequest = requestManager.createBreakpointRequest(location); breakPointRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL); String expression = breakpoint.getBreakpointConfiguration().getCondition(); if (!(expression == null || expression.isEmpty())) { ExpressionParser parser = ExpressionParser.newInstance(expression); breakPointRequest.putProperty( "org.eclipse.che.ide.java.debug.condition.expression.parser", parser); } breakPointRequest.putProperty( "hit_count", breakpoint.getBreakpointConfiguration().getHitCount()); breakPointRequest.setEnabled(true); } catch (NativeMethodException | IllegalThreadStateException | InvalidRequestStateException e) { throw new DebuggerException(e.getMessage(), e); } debuggerCallback.onEvent( new BreakpointActivatedEventImpl( new BreakpointImpl( breakpoint.getLocation(), breakpoint.getBreakpointConfiguration(), true))); LOG.debug("Add breakpoint: {}", location); }

Target:
public void addBreakpoint(Breakpoint breakpoint) throws DebuggerException { final String className = debuggerUtil.findFqnByPosition(breakpoint.getLocation()); final int lineNumber = breakpoint.getLocation().getLineNumber(); List<ReferenceType> classes = vm.classesByName(className); if (classes.isEmpty()) { deferBreakpoint(className, breakpoint); return; } ReferenceType clazz = classes.get(0); List<com.sun.jdi.Location> locations; try { locations = clazz.locationsOfLine(lineNumber); } catch (AbsentInformationException | ClassNotPreparedException e) { throw new DebuggerException(e.getMessage(), e); } if (locations.isEmpty()) { throw new DebuggerException("Line " + lineNumber + " not found in class " + className); } com.sun.jdi.Location location = locations.get(0); if (location.method() == null) { throw new DebuggerException("Invalid line " + lineNumber + " in class " + className); } EventRequestManager requestManager = getEventManager(); for (BreakpointRequest breakpointRequest : requestManager.breakpointRequests()) { if (location.equals(breakpointRequest.location())) { LOG.debug("Breakpoint at already set", location); return; } } try { EventRequest breakPointRequest = requestManager.createBreakpointRequest(location); breakPointRequest.setSuspendPolicy(EventRequest.SUSPEND_ALL); String expression = breakpoint.getCondition(); if (!(expression == null || expression.isEmpty())) { ExpressionParser parser = ExpressionParser.newInstance(expression); breakPointRequest.putProperty( "org.eclipse.che.ide.java.debug.condition.expression.parser", parser); } breakPointRequest.setEnabled(true); } catch (NativeMethodException | IllegalThreadStateException | InvalidRequestStateException e) { throw new DebuggerException(e.getMessage(), e); } debuggerCallback.onEvent( new BreakpointActivatedEventImpl( new BreakpointImpl(breakpoint.getLocation(), true, breakpoint.getCondition()))); LOG.debug("Add breakpoint: {}", location); }