internal void RemoveBreakPoint(PythonBreakpoint unboundBreakpoint) { DebugWriteCommand("Remove Breakpoint"); _breakpoints.Remove(unboundBreakpoint.Id); DisableBreakPoint(unboundBreakpoint); }
internal void SetBreakPointCondition(PythonBreakpoint breakpoint) { DebugWriteCommand("Set BP Condition"); _socket.Send(SetBreakPointConditionCommandBytes); _socket.Send(BitConverter.GetBytes(breakpoint.Id)); SendCondition(breakpoint); }
public PythonBreakpoint AddBreakPoint(string filename, int lineNo, string condition = "", bool breakWhenChanged = false) { int id = _breakpointCounter++; var res = new PythonBreakpoint(this, filename, lineNo, condition, breakWhenChanged, id); _breakpoints[id] = res; return(res); }
internal void BindBreakpoint(PythonBreakpoint breakpoint) { DebugWriteCommand("Bind Breakpoint"); _socket.Send(SetBreakPointCommandBytes); _socket.Send(BitConverter.GetBytes(breakpoint.Id)); _socket.Send(BitConverter.GetBytes(breakpoint.LineNo)); SendString(_socket, MapFile(breakpoint.Filename)); SendCondition(breakpoint); }
internal void DisableBreakPoint(PythonBreakpoint unboundBreakpoint) { if (_socket != null && _socket.Connected) { DebugWriteCommand("Disable Breakpoint"); _socket.Send(RemoveBreakPointCommandBytes); _socket.Send(BitConverter.GetBytes(unboundBreakpoint.LineNo)); _socket.Send(BitConverter.GetBytes(unboundBreakpoint.Id)); } }
internal void SetBreakPointPassCount(PythonBreakpoint breakpoint) { DebugWriteCommand("Set BP pass count"); lock (_streamLock) { _stream.Write(SetBreakPointPassCountCommandBytes); _stream.WriteInt32(breakpoint.Id); SendPassCount(breakpoint); } }
private void SendPassCount(PythonBreakpoint breakpoint) { DebugWriteCommand("Send BP pass count"); _stream.WriteInt32((int)breakpoint.PassCountKind); _stream.WriteInt32(breakpoint.PassCount); }
internal void SetBreakPointCondition(PythonBreakpoint breakpoint) { DebugWriteCommand("Set BP Condition"); lock (_streamLock) { _stream.Write(SetBreakPointConditionCommandBytes); _stream.WriteInt32(breakpoint.Id); SendCondition(breakpoint); } }
private void SendCondition(PythonBreakpoint breakpoint) { DebugWriteCommand("Send BP Condition"); _stream.WriteInt32((int)breakpoint.ConditionKind); _stream.WriteString(breakpoint.Condition ?? ""); }
public PythonBreakpoint AddBreakPoint( string filename, int lineNo, PythonBreakpointConditionKind conditionKind = PythonBreakpointConditionKind.Always, string condition = "", PythonBreakpointPassCountKind passCountKind = PythonBreakpointPassCountKind.Always, int passCount = 0 ) { int id = _breakpointCounter++; var res = new PythonBreakpoint(this, filename, lineNo, conditionKind, condition, passCountKind, passCount, id); _breakpoints[id] = res; return res; }
public BreakpointEventArgs(PythonBreakpoint breakpoint) { _breakpoint = breakpoint; }
public BreakpointHitEventArgs(PythonBreakpoint breakpoint, PythonThread thread) { _breakpoint = breakpoint; _thread = thread; }
private void SendCondition(PythonBreakpoint breakpoint) { DebugWriteCommand("Send BP Condition"); SendString(_socket, breakpoint.Condition ?? ""); _socket.Send(BitConverter.GetBytes(breakpoint.BreakWhenChanged ? 1 : 0)); }
internal void SetBreakPointHitCount(PythonBreakpoint breakpoint, int count) { DebugWriteCommand("Set BP hit count"); lock (_streamLock) { _stream.Write(SetBreakPointHitCountCommandBytes); _stream.WriteInt32(breakpoint.Id); _stream.WriteInt32(count); } }
internal Task<int> GetBreakPointHitCountAsync(PythonBreakpoint breakpoint) { DebugWriteCommand("Get BP hit count"); int reqId = _ids.Allocate(); var tcs = new TaskCompletionSource<int>(); lock (_pendingGetHitCountRequestsLock) { _pendingGetHitCountRequests[reqId] = tcs; } lock (_streamLock) { _stream.Write(GetBreakPointHitCountCommandBytes); _stream.WriteInt32(reqId); _stream.WriteInt32(breakpoint.Id); } return tcs.Task; }
internal void DisableBreakPoint(PythonBreakpoint unboundBreakpoint) { if (_stream != null) { DebugWriteCommand("Disable Breakpoint"); lock (_streamLock) { if (unboundBreakpoint.IsDjangoBreakpoint) { _stream.Write(RemoveDjangoBreakPointCommandBytes); } else { _stream.Write(RemoveBreakPointCommandBytes); } _stream.WriteInt32(unboundBreakpoint.LineNo); _stream.WriteInt32(unboundBreakpoint.Id); if (unboundBreakpoint.IsDjangoBreakpoint) { _stream.WriteString(unboundBreakpoint.Filename); } } } }
public PythonBreakpoint AddDjangoBreakPoint(string filename, int lineNo) { int id = _breakpointCounter++; var res = new PythonBreakpoint(this, filename, lineNo, PythonBreakpointConditionKind.Always, "", PythonBreakpointPassCountKind.Always, 0 , id, true); _breakpoints[id] = res; return res; }
internal void BindBreakpoint(PythonBreakpoint breakpoint) { DebugWriteCommand(String.Format("Bind Breakpoint IsDjango: {0}", breakpoint.IsDjangoBreakpoint)); lock (_streamLock) { if (breakpoint.IsDjangoBreakpoint) { _stream.Write(AddDjangoBreakPointCommandBytes); } else { _stream.Write(SetBreakPointCommandBytes); } _stream.WriteInt32(breakpoint.Id); _stream.WriteInt32(breakpoint.LineNo); _stream.WriteString(MapFile(breakpoint.Filename)); if (!breakpoint.IsDjangoBreakpoint) { SendCondition(breakpoint); SendPassCount(breakpoint); } } }