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