mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-82961 Mute breakpoints turns off when when start a new debug session
This commit is contained in:
@@ -771,7 +771,9 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
myDebugProcessDispatcher.getMulticaster().processDetached(this, closedByUser);
|
||||
}
|
||||
finally {
|
||||
setBreakpointsMuted(false);
|
||||
if (DebuggerSettings.getInstance().UNMUTE_ON_STOP) {
|
||||
setBreakpointsMuted(false);
|
||||
}
|
||||
if (vm != null) {
|
||||
try {
|
||||
vm.dispose(); // to be on the safe side ensure that VM mirror, if present, is disposed and invalidated
|
||||
|
||||
@@ -69,7 +69,7 @@ public class DebuggerSettings implements JDOMExternalizable, NamedComponent, Clo
|
||||
public volatile boolean WATCH_RETURN_VALUES = false;
|
||||
public volatile boolean AUTO_VARIABLES_MODE = false;
|
||||
public volatile boolean SHOW_LIBRARY_STACKFRAMES = true;
|
||||
|
||||
public volatile boolean UNMUTE_ON_STOP = false;
|
||||
|
||||
private ClassFilter[] mySteppingFilters = ClassFilter.EMPTY_ARRAY;
|
||||
|
||||
|
||||
@@ -323,6 +323,7 @@ public class DebuggerSessionTab extends DebuggerSessionTabBase implements Dispos
|
||||
}
|
||||
settings.add(new WatchLastMethodReturnValueAction());
|
||||
settings.add(new AutoVarsSwitchAction());
|
||||
settings.add(new UnmuteOnStopAction());
|
||||
settings.addSeparator();
|
||||
addActionToGroup(settings, XDebuggerActions.AUTO_TOOLTIP);
|
||||
|
||||
@@ -379,6 +380,12 @@ public class DebuggerSessionTab extends DebuggerSessionTabBase implements Dispos
|
||||
for (DebuggerTreeNodeImpl watch : watches) {
|
||||
watchTree.addWatch((WatchItemDescriptor)watch.getDescriptor());
|
||||
}
|
||||
|
||||
DebugProcessImpl process = getDebugProcess();
|
||||
DebugProcessImpl reuseProcess = reuseSession.getDebugProcess();
|
||||
if (process != null && reuseProcess != null) {
|
||||
process.setBreakpointsMuted(reuseProcess.areBreakpointsMuted());
|
||||
}
|
||||
}
|
||||
|
||||
public String getSessionName() {
|
||||
@@ -591,4 +598,23 @@ public class DebuggerSessionTab extends DebuggerSessionTabBase implements Dispos
|
||||
}
|
||||
}
|
||||
|
||||
private class UnmuteOnStopAction extends ToggleAction {
|
||||
private volatile boolean myUnmuteOnStop;
|
||||
|
||||
private UnmuteOnStopAction() {
|
||||
super(DebuggerBundle.message("action.unmute.on.stop.text"), DebuggerBundle.message("action.unmute.on.stop.text"), null);
|
||||
myUnmuteOnStop = DebuggerSettings.getInstance().UNMUTE_ON_STOP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelected(AnActionEvent e) {
|
||||
return myUnmuteOnStop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(AnActionEvent e, boolean state) {
|
||||
myUnmuteOnStop = state;
|
||||
DebuggerSettings.getInstance().UNMUTE_ON_STOP = state;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,6 +431,7 @@ title.smart.step.popup=Method to Step Into
|
||||
action.show.watches.description=Shows or hides 'watches' pane
|
||||
action.show.watches.text.hide=Hide Watches
|
||||
action.show.watches.text.show=Show Watches
|
||||
action.unmute.on.stop.text=Unmute breakpoints on stop
|
||||
action.watch.method.return.value.description=Enables watching last executed method return value
|
||||
action.watches.method.return.value.enable=Watch method return values
|
||||
action.watches.method.return.value.disable=Stop watching method return values
|
||||
|
||||
Reference in New Issue
Block a user