Beispiel #1
0
 protected void DoStackSelected(StackEntry stackEntry)
 {
     if (this.StackSelected != null)
     {
         this.StackSelected(this, new StackEventArgs(stackEntry));
     }
 }
Beispiel #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);
        }
Beispiel #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;
        }
Beispiel #4
0
 public StackEventArgs(StackEntry stackEntry)
 {
     this.StackEntry = stackEntry;
 }