/** * Prepare to execute in <strong>step into</strong> mode when guest language program execution * resumes. In this mode, the current thread continues until it arrives to a code location with * one of the enabled {@link StepConfig.Builder#sourceElements(SourceElement...) source * elements} and repeats that process {@link StepConfig.Builder#count(int) step count} times. * See {@link StepConfig} for the details about the stepping behavior. * <p> * This mode persists until the thread resumes and then suspends, at which time the mode reverts * to {@linkplain #prepareContinue() Continue}, or the thread dies. * <p> * A breakpoint set at a location where execution would suspend is treated specially as a single * event, to avoid multiple suspensions at a single location. * <p> * This method is thread-safe and the prepared StepInto mode is appended to any other previously * prepared modes. * * @param stepConfig the step configuration * @return this event instance for an easy concatenation of method calls * @throws IllegalStateException when {@link #prepareContinue() continue} or * {@link #prepareKill() kill} is prepared already, or when the current debugger * session has no source elements enabled for stepping. * @throws IllegalArgumentException when the {@link StepConfig} contains source elements not * enabled for stepping in the current debugger session. * @since 0.33 */ public SuspendedEvent prepareStepInto(StepConfig stepConfig) { verifyConfig(stepConfig); setNextStrategy(SteppingStrategy.createStepInto(session, stepConfig)); return this; }
/** * Prepare to execute in <strong>step out</strong> mode when guest language program execution * resumes. In this mode, the current thread continues until it arrives to an enclosing code * location with one of the enabled {@link StepConfig.Builder#sourceElements(SourceElement...) * source elements} and repeats that process {@link StepConfig.Builder#count(int) step count} * times. See {@link StepConfig} for the details about the stepping behavior. * <p> * This mode persists until the thread resumes and then suspends, at which time the mode reverts * to {@linkplain #prepareContinue() Continue}, or the thread dies. * <p> * A breakpoint set at a location where execution would suspend is treated specially as a single * event, to avoid multiple suspensions at a single location. * <p> * This method is thread-safe and the prepared StepInto mode is appended to any other previously * prepared modes. * * @param stepConfig the step configuration * @return this event instance for an easy concatenation of method calls * @throws IllegalStateException when {@link #prepareContinue() continue} or * {@link #prepareKill() kill} is prepared already, or when the current debugger * session has no source elements enabled for stepping. * @throws IllegalArgumentException when the {@link StepConfig} contains source elements not * enabled for stepping in the current debugger session. * @since 0.33 */ public SuspendedEvent prepareStepOut(StepConfig stepConfig) { verifyConfig(stepConfig); setNextStrategy(SteppingStrategy.createStepOut(session, stepConfig)); return this; }
verifyConfig(stepConfig); setNextStrategy(SteppingStrategy.createStepOver(session, stepConfig)); return this;
verifyConfig(stepConfig); setNextStrategy(SteppingStrategy.createStepOver(session, stepConfig)); return this;
/** * Prepare to execute in <strong>step out</strong> mode when guest language program execution * resumes. In this mode, the current thread continues until it arrives to an enclosing code * location with one of the enabled {@link StepConfig.Builder#sourceElements(SourceElement...) * source elements} and repeats that process {@link StepConfig.Builder#count(int) step count} * times. See {@link StepConfig} for the details about the stepping behavior. * <p> * This mode persists until the thread resumes and then suspends, at which time the mode reverts * to {@linkplain #prepareContinue() Continue}, or the thread dies. * <p> * A breakpoint set at a location where execution would suspend is treated specially as a single * event, to avoid multiple suspensions at a single location. * <p> * This method is thread-safe and the prepared StepInto mode is appended to any other previously * prepared modes. * * @param stepConfig the step configuration * @return this event instance for an easy concatenation of method calls * @throws IllegalStateException when {@link #prepareContinue() continue} or * {@link #prepareKill() kill} is prepared already, or when the current debugger * session has no source elements enabled for stepping. * @throws IllegalArgumentException when the {@link StepConfig} contains source elements not * enabled for stepping in the current debugger session. * @since 0.33 */ public SuspendedEvent prepareStepOut(StepConfig stepConfig) { verifyConfig(stepConfig); setNextStrategy(SteppingStrategy.createStepOut(session, stepConfig)); return this; }
/** * Prepare to execute in <strong>step into</strong> mode when guest language program execution * resumes. In this mode, the current thread continues until it arrives to a code location with * one of the enabled {@link StepConfig.Builder#sourceElements(SourceElement...) source * elements} and repeats that process {@link StepConfig.Builder#count(int) step count} times. * See {@link StepConfig} for the details about the stepping behavior. * <p> * This mode persists until the thread resumes and then suspends, at which time the mode reverts * to {@linkplain #prepareContinue() Continue}, or the thread dies. * <p> * A breakpoint set at a location where execution would suspend is treated specially as a single * event, to avoid multiple suspensions at a single location. * <p> * This method is thread-safe and the prepared StepInto mode is appended to any other previously * prepared modes. * * @param stepConfig the step configuration * @return this event instance for an easy concatenation of method calls * @throws IllegalStateException when {@link #prepareContinue() continue} or * {@link #prepareKill() kill} is prepared already, or when the current debugger * session has no source elements enabled for stepping. * @throws IllegalArgumentException when the {@link StepConfig} contains source elements not * enabled for stepping in the current debugger session. * @since 0.33 */ public SuspendedEvent prepareStepInto(StepConfig stepConfig) { verifyConfig(stepConfig); setNextStrategy(SteppingStrategy.createStepInto(session, stepConfig)); return this; }