Exemplo n.º 1
0
 protected void DoStackSelected(StackEntry stackEntry)
 {
     if (this.StackSelected != null)
     {
         this.StackSelected(this, new StackEventArgs(stackEntry));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Get the callstack up to this point.
        /// </summary>
        public List <StackEntry> GetCallStack(int Depth)
        {
            string options = "";

            if (Depth != -1)
            {
                options = "-d " + Depth;
            }

            XDebug.Command  c = new Command("stack_get", options);
            XDebug.Response m = this.SendCommand(c);

            List <StackEntry> CallStack = new List <StackEntry>();

            foreach (XmlElement n in m.XmlMessage.DocumentElement.ChildNodes)
            {
                if (n.Name.ToLower() == "stack")
                {
                    StackEntry se = new StackEntry();

                    se.fileName   = this.getLocalFilename(n.Attributes["filename"].Value);
                    se.lineNumber = System.Convert.ToInt32(n.Attributes["lineno"].Value);
                    se.level      = System.Convert.ToInt32(n.Attributes["level"].Value);
                    se.location   = n.Attributes["where"].Value;
                    // TODO redundant? just remove the old one?
                    /* Linenumbers have to be zero based. Xdebug uses 1-based. */
                    se.Location.filename = se.fileName;
                    se.Location.line     = se.lineNumber - 1;

                    CallStack.Add(se);
                }
            }

            return(CallStack);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Get the callstack up to this point.
        /// </summary>        
        public List<StackEntry> GetCallStack(int Depth)
        {
            string options = "";

            if (Depth != -1)
                options = "-d " + Depth;

            XDebug.Command c = new Command("stack_get", options);
            XDebug.Response m = this.SendCommand(c);

            List<StackEntry> CallStack = new List<StackEntry>();

            foreach (XmlElement n in m.XmlMessage.DocumentElement.ChildNodes)
            {
                if (n.Name.ToLower() == "stack")
                {
                    StackEntry se = new StackEntry();

                    se.fileName = this.getLocalFilename(n.Attributes["filename"].Value);
                    se.lineNumber = System.Convert.ToInt32(n.Attributes["lineno"].Value);
                    se.level = System.Convert.ToInt32(n.Attributes["level"].Value);
                    se.location = n.Attributes["where"].Value;
                    // TODO redundant? just remove the old one?
                    /* Linenumbers have to be zero based. Xdebug uses 1-based. */
                    se.Location.filename = se.fileName;
                    se.Location.line = se.lineNumber - 1;

                    CallStack.Add(se);
                }
            }

            return CallStack;
        }
Exemplo n.º 4
0
 public StackEventArgs(StackEntry stackEntry)
 {
     this.StackEntry = stackEntry;
 }