Exemplo n.º 1
0
        private static void Dispatch(Stream inputStream, Stream outputStream, List <LoggingCategory> loggingCategories)
        {
            AD7DebugSession debugSession = new AD7DebugSession(inputStream, outputStream, loggingCategories);

            debugSession.Protocol.Run();
            debugSession.Protocol.WaitForReader();
        }
Exemplo n.º 2
0
        public static TextPositionTuple GetTextPositionOfFrame(AD7DebugSession session, IDebugStackFrame2 frame)
        {
            IDebugDocumentContext2 documentContext;

            if (frame.GetDocumentContext(out documentContext) == 0 &&
                documentContext != null)
            {
                TEXT_POSITION[] beginPosition = new TEXT_POSITION[1];
                TEXT_POSITION[] endPosition   = new TEXT_POSITION[1];
                documentContext.GetStatementRange(beginPosition, endPosition);

                string filePath;
                documentContext.GetName(enum_GETNAME_TYPE.GN_FILENAME, out filePath);

                Source source = new Source(session.ConvertDebuggerPathToClient(filePath));
                int    line   = session.ConvertDebuggerLineToClient((int)beginPosition[0].dwLine);
                int    column = unchecked ((int)(beginPosition[0].dwColumn + 1));

                return(new TextPositionTuple(source, line, column));
            }

            return(null);
        }