Beispiel #1
0
        /// <summary>
        /// Perform a single step on the given thread.
        /// </summary>
        public Task StepAsync(StepRequest request)
        {
            // Set event
            lastStepRequest = request;
            var thread  = request.Thread;
            var setTask = debugger.EventRequest.SetAsync(Jdwp.EventKind.SingleStep, Jdwp.SuspendPolicy.All, new EventStepModifier(thread.Id, Jdwp.StepSize.Line, request.StepDepth));

            return(setTask.ContinueWith(t => {
                t.ForwardException();
                // Record step
                StepManager.Add(new DalvikStep(thread, t.Result));
                // Resume execution
                return debugger.VirtualMachine.ResumeAsync().ContinueWith(x => OnResumed());
            }).Unwrap());
        }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            StepManager SM   = new StepManager();
            StepTBx     step = new StepTBx();


            step.status = 1;
            step.effect = Request["effect"];

            StepTBx temp = SM.GetbyStepnumber(int.Parse(Request["number"]));
            if (temp != null)
            {
                Response.Write(JsonConvert.SerializeObject(new
                {
                    success = 0,
                    error   = "Step was has Effect"
                }));
                return;
            }
            step.step_number = int.Parse(Request["number"]);
            SM.Add(step);
            Response.Write(JsonConvert.SerializeObject(new
            {
                success = 1
            }));
        }
        catch (Exception ex)
        {
            Response.Write(JsonConvert.SerializeObject(new
            {
                success = -1,
                error   = ex
            }));
        }
    }