Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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));
            }
        }
Esempio n. 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));
            }
        }
Esempio n. 5
0
 public OutputEventArgs(PythonThread thread, string output)
 {
     _thread = thread;
     _output = output;
 }
Esempio n. 6
0
 public OutputEventArgs(PythonThread thread, string output) {
     _thread = thread;
     _output = output;
 }
Esempio n. 7
0
 public ExceptionRaisedEventArgs(PythonThread thread, PythonException exception, bool isUnhandled) {
     _thread = thread;
     _exception = exception;
     _isUnhandled = isUnhandled;
 }
Esempio n. 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;
 }
Esempio n. 10
0
 public ThreadEventArgs(PythonThread thread) {
     _thread = thread;
 }
Esempio n. 11
0
 public BreakpointHitEventArgs(PythonBreakpoint breakpoint, PythonThread thread)
 {
     _breakpoint = breakpoint;
     _thread     = thread;
 }
Esempio n. 12
0
 public ThreadEventArgs(PythonThread thread)
 {
     _thread = thread;
 }
Esempio n. 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;
 }
Esempio n. 14
0
 public BreakpointHitEventArgs(PythonBreakpoint breakpoint, PythonThread thread) {
     _breakpoint = breakpoint;
     _thread = thread;
 }
Esempio n. 15
0
 public OutputEventArgs(PythonThread thread, string output, OutputChannel channel)
 {
     Thread  = thread;
     Output  = output;
     Channel = channel;
 }
Esempio n. 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();
     }
 }
Esempio n. 17
0
 public ExceptionRaisedEventArgs(PythonThread thread, PythonException exception) {
     _thread = thread;
     _exception = exception;
 }
Esempio n. 18
0
        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));
            }
        }
Esempio n. 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;
 }