void jint_Step(object sender, Jint.Debugger.DebugInformation e) { if (!e.CurrentStatement.Source.Code.StartsWith("FindProxyForURL")) { listBox1.Invoke(new Action(delegate { listBox1.Items.Add(string.Format("{0}: {1}\n", e.CurrentStatement.Source, e.CurrentStatement.Source.Code)); listBox1.SelectedIndex = listBox1.Items.Count - 1; string source = e.CurrentStatement.Source.ToString(); if (source.Contains(" ")) { string lineNumber = source.Split(' ')[1]; int line; if (Int32.TryParse(lineNumber, out line)) { textEditor1.SelectAll(); textEditor1.SelectionBackColor = textEditor1.BackColor; textEditor1.Select(textEditor1.GetFirstCharIndexFromLine(line - 1), textEditor1.Lines[line - 1].Length); textEditor1.SelectionBackColor = Color.Yellow; // // textEditor1.HighlightActiveLine = true; // // textEditor1.GotoLine(line - 1); } } })); } }
public void OnBreak(object sender, EventArgs e) { CurrentBreakpoint = (Jint.Debugger.DebugInformation)e; String moduleName = breakPointsMap[CurrentBreakpoint.Module.ToLower()]; SendCommand(remoteHost, String.Format("suspended?breakpoint={0}:{1}", moduleName, CurrentBreakpoint.CurrentStatement.Source.Start.Line.ToString())); resumeEvent.WaitOne(); }
void engine_Step(object sender, Jint.Debugger.DebugInformation e) { //触发异常,停止脚步运行 if (stopClicked) { stopClicked = false; throw new StopJintException(); } }
void context_Step(object sender, Jint.Debugger.DebugInformation e) { throw new Exception("Comment me if use"); }
private void OnBreak(object sender, Jint.Debugger.DebugInformation e) { Debugger.OnBreak(sender, e); }