public PythonStackFrame(PythonThread thread, string frameName, string filename, int startLine, int endLine, int lineNo, int argCount, int frameId) { _thread = thread; _frameName = frameName; _filename = filename; _argCount = argCount; _lineNo = lineNo; _frameId = frameId; _startLine = startLine; _endLine = endLine; }
public PythonStackFrame(PythonThread thread, string frameName, string filename, int startLine, int endLine, int lineNo, int argCount, int frameId, FrameKind kind) { _thread = thread; _frameName = frameName; _filename = filename; _argCount = argCount; _lineNo = lineNo; _frameId = frameId; _startLine = startLine; _endLine = endLine; _kind = kind; }
private void HandleThreadCreate(Socket socket) { // new thread int threadId = socket.ReadInt(); var thread = _threads[threadId] = new PythonThread(this, threadId); var created = ThreadCreated; if (created != null) { created(this, new ThreadEventArgs(thread)); } }
private void HandleThreadCreate(Stream stream) { // new thread long threadId = stream.ReadInt64(); var thread = _threads[threadId] = new PythonThread(this, threadId, _createdFirstThread); _createdFirstThread = true; var created = ThreadCreated; if (created != null) { created(this, new ThreadEventArgs(thread)); } }
public OutputEventArgs(PythonThread thread, string output) { _thread = thread; _output = output; }
public ExceptionRaisedEventArgs(PythonThread thread, PythonException exception, bool isUnhandled) { _thread = thread; _exception = exception; _isUnhandled = isUnhandled; }
public OutputEventArgs(PythonThread thread, string output, bool isStdOut) { _thread = thread; _output = output; _isStdOut = isStdOut; }
public ThreadEventArgs(PythonThread thread) { _thread = thread; }
public BreakpointHitEventArgs(PythonBreakpoint breakpoint, PythonThread thread) { _breakpoint = breakpoint; _thread = thread; }
public DjangoStackFrame(PythonThread thread, string frameName, string filename, int startLine, int endLine, int lineNo, int argCount, int frameId, string sourceFile, int sourceLine) : base(thread, frameName, filename, startLine, endLine, lineNo, argCount, frameId, FrameKind.Django) { _sourceFile = sourceFile; _sourceLine = sourceLine; }
public OutputEventArgs(PythonThread thread, string output, OutputChannel channel) { Thread = thread; Output = output; Channel = channel; }
private static string TryGetStack(PythonThread thread) { try { return string.Join( Environment.NewLine, thread.Frames.Select(f => { var fn = f.FileName; if (CommonUtils.IsSubpathOf(TestData.GetPath("TestData"), fn)) { fn = CommonUtils.GetRelativeFilePath(TestData.GetPath(), fn); } return string.Format(" {0} in {1}:{2}", f.FunctionName, fn, f.LineNo); }) ); } catch (Exception ex) { return "Failed to read stack." + Environment.NewLine + ex.ToString(); } }
public ExceptionRaisedEventArgs(PythonThread thread, PythonException exception) { _thread = thread; _exception = exception; }
internal void SwitchThread(PythonThread thread, bool verbose) { var frame = thread.Frames.FirstOrDefault(); if (frame == null) { Window.WriteError(string.Format("Cannot change current thread to {0}, because it does not have any visible frames.", thread.Id)); return; } _threadId = thread.Id; _frameId = frame.FrameId; SetThreadAndFrameCommand(thread.Id, _frameId, frame.Kind); if (verbose) { Window.WriteLine(String.Format("Current thread changed to {0}, frame {1}", _threadId, _frameId)); } }