Пример #1
0
        // Gets the document context for this stack frame. The debugger will call this when the current stack frame is changed
        // and will use it to open the correct source document for this stack frame.
        int IDebugStackFrame2.GetDocumentContext(out IDebugDocumentContext2 docContext)
        {
            docContext = null;

            var span  = _engine.Process.GetStatementSpan(StackFrame.FileName, _stackFrame.LineNo, 0);
            var begTp = new TEXT_POSITION {
                dwLine = (uint)(span.Start.Line - 1), dwColumn = (uint)(span.Start.Column - 1)
            };
            var endTp = new TEXT_POSITION {
                dwLine = (uint)(span.End.Line - 1), dwColumn = (uint)(span.End.Column - 1)
            };

            docContext = new AD7DocumentContext(_stackFrame.FileName, begTp, endTp, null, _stackFrame.Kind);
            return(VSConstants.S_OK);
        }
        public AD7StackFrame(AD7Engine engine, AD7Thread thread, Mono.Debugger.Soft.StackFrame threadContext)
        {
            Debug.Assert(threadContext != null, "ThreadContext is null");

            Engine = engine;
            this.Thread = thread;
            this.ThreadContext = threadContext;

            _textPosition = RoslynHelper.GetStatementRange(ThreadContext.FileName, ThreadContext.LineNumber, ThreadContext.ColumnNumber);
            _functionName = threadContext.Method.Name;

            //if(threadContext.IsNativeTransition)
            //{

            //}

            if (_textPosition != null)
            {
                docContext = new AD7DocumentContext(_textPosition);
            }

            this.LocalVariables = threadContext.GetVisibleVariables().Select(x => new MonoProperty(threadContext, x)).ToList();
        }
Пример #3
0
 public AD7BreakpointResolution(AD7Engine engine, PythonBreakpoint address, AD7DocumentContext documentContext)
 {
     m_engine          = engine;
     m_address         = address;
     m_documentContext = documentContext;
 }