Commit 9cb03ac6 authored by Elizaveta Shashkova's avatar Elizaveta Shashkova
Browse files

PY-32086 Check file validity before editing breakpoints

parent 03d6cacc
Showing with 2 additions and 2 deletions
+2 -2
......@@ -38,7 +38,7 @@ public class AbstractLineBreakpointHandler extends XBreakpointHandler<XLineBreak
@Override
public void registerBreakpoint(@NotNull final XLineBreakpoint<XBreakpointProperties> breakpoint) {
final XSourcePosition position = breakpoint.getSourcePosition();
if (position != null) {
if (position != null && position.getFile().isValid()) {
myDebugProcess.addBreakpoint(myDebugProcess.getPositionConverter().convertToPython(position), breakpoint);
myBreakPointPositions.put(breakpoint, position);
}
......@@ -47,7 +47,7 @@ public class AbstractLineBreakpointHandler extends XBreakpointHandler<XLineBreak
@Override
public void unregisterBreakpoint(@NotNull final XLineBreakpoint<XBreakpointProperties> breakpoint, final boolean temporary) {
final XSourcePosition position = myBreakPointPositions.get(breakpoint);
if (position != null) {
if (position != null && position.getFile().isValid()) {
myDebugProcess.removeBreakpoint(myDebugProcess.getPositionConverter().convertToPython(position));
myBreakPointPositions.remove(breakpoint);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment