Exemple #1
0
 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;
 }
Exemple #2
0
 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;
 }
Exemple #3
0
        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));
            }
        }
Exemple #4
0
        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));
            }
        }
Exemple #5
0
 public OutputEventArgs(PythonThread thread, string output)
 {
     _thread = thread;
     _output = output;
 }
Exemple #6
0
 public OutputEventArgs(PythonThread thread, string output) {
     _thread = thread;
     _output = output;
 }
 public ExceptionRaisedEventArgs(PythonThread thread, PythonException exception, bool isUnhandled) {
     _thread = thread;
     _exception = exception;
     _isUnhandled = isUnhandled;
 }
Exemple #8
0
 public OutputEventArgs(PythonThread thread, string output, bool isStdOut)
 {
     _thread   = thread;
     _output   = output;
     _isStdOut = isStdOut;
 }
 public ExceptionRaisedEventArgs(PythonThread thread, PythonException exception, bool isUnhandled)
 {
     _thread      = thread;
     _exception   = exception;
     _isUnhandled = isUnhandled;
 }
Exemple #10
0
 public ThreadEventArgs(PythonThread thread) {
     _thread = thread;
 }
 public BreakpointHitEventArgs(PythonBreakpoint breakpoint, PythonThread thread)
 {
     _breakpoint = breakpoint;
     _thread     = thread;
 }
Exemple #12
0
 public ThreadEventArgs(PythonThread thread)
 {
     _thread = thread;
 }
Exemple #13
0
 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 BreakpointHitEventArgs(PythonBreakpoint breakpoint, PythonThread thread) {
     _breakpoint = breakpoint;
     _thread = thread;
 }
Exemple #15
0
 public OutputEventArgs(PythonThread thread, string output, OutputChannel channel)
 {
     Thread  = thread;
     Output  = output;
     Channel = channel;
 }
Exemple #16
0
 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));
            }
        }
Exemple #19
0
 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 ExceptionRaisedEventArgs(PythonThread thread, PythonException exception)
 {
     _thread    = thread;
     _exception = exception;
 }