示例#1
0
 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);
                 }
             }
         }));
     }
 }
示例#2
0
        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();
        }
示例#3
0
        void engine_Step(object sender, Jint.Debugger.DebugInformation e)
        {
            //触发异常,停止脚步运行
            if (stopClicked)
            {
                stopClicked = false;

                throw new StopJintException();
            }
        }
示例#4
0
        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 context_Step(object sender, Jint.Debugger.DebugInformation e)
 {
     throw new Exception("Comment me if use");
 }
示例#6
0
 private void OnBreak(object sender, Jint.Debugger.DebugInformation e)
 {
     Debugger.OnBreak(sender, e);
 }