experimental option to keep step requests (this allows to continue stepping after hitting a breakpoint in the middle)

This commit is contained in:
Egor.Ushakov
2017-04-19 16:03:21 +03:00
parent fdeae7754c
commit f47057bc42
3 changed files with 9 additions and 3 deletions
@@ -373,6 +373,8 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
? EventRequest.SUSPEND_EVENT_THREAD
: EventRequest.SUSPEND_ALL);
stepRequest.addCountFilter(1);
if (hint != null) {
//noinspection HardCodedStringLiteral
stepRequest.putProperty("hint", hint);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package com.intellij.debugger.engine;
import com.intellij.debugger.engine.events.DebuggerCommandImpl;
import com.intellij.debugger.jdi.ThreadReferenceProxyImpl;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.registry.Registry;
import com.sun.jdi.InternalException;
import com.sun.jdi.ObjectCollectedException;
import com.sun.jdi.event.EventSet;
@@ -311,8 +312,10 @@ public class SuspendManagerImpl implements SuspendManager {
LOG.debug("vote paused");
myDebugProcess.logThreads();
myDebugProcess.cancelRunToCursorBreakpoint();
final ThreadReferenceProxyImpl thread = suspendContext.getThread();
myDebugProcess.deleteStepRequests(thread != null ? thread.getThreadReference() : null);
if (!Registry.is("debugger.keep.step.requests")) {
ThreadReferenceProxyImpl thread = suspendContext.getThread();
myDebugProcess.deleteStepRequests(thread != null ? thread.getThreadReference() : null);
}
notifyPaused(suspendContext);
}
}
@@ -269,6 +269,7 @@ debugger.intern.string.literals.description=Make string literal refer to the sam
debugger.capture.points=true
debugger.capture.points.annotations=false
debugger.resume.yourkit.threads=false
debugger.keep.step.requests=false
analyze.exceptions.on.the.fly=false
analyze.exceptions.on.the.fly.description=Automatically analyze clipboard on frame activation,\