예제 #1
0
파일: MonoProxy.cs 프로젝트: vdavyan/mono
        async Task <bool> RemoveBreakpoint(MessageId msg_id, JObject args, CancellationToken token)
        {
            var bpid = args? ["breakpointId"]?.Value <string> ();

            var context = GetContext(msg_id);

            if (!context.BreakpointRequests.TryGetValue(bpid, out var breakpointRequest))
            {
                return(false);
            }

            foreach (var bp in breakpointRequest.Locations)
            {
                var res = await SendMonoCommand(msg_id, MonoCommands.RemoveBreakpoint(bp.RemoteId), token);

                var ret_code = res.Value? ["result"]? ["value"]?.Value <int> ();

                if (ret_code.HasValue)
                {
                    bp.RemoteId = -1;
                    bp.State    = BreakpointState.Disabled;
                }
            }
            breakpointRequest.Locations.Clear();
            return(false);
        }
예제 #2
0
        async Task <Result> RemoveBreakpoint(SessionId sessionId, Breakpoint bp, CancellationToken token)
        {
            var res = await SendMonoCommand(sessionId, MonoCommands.RemoveBreakpoint(bp.RemoteId), token);

            var ret_code = res.Value? ["result"]? ["value"]?.Value <int> ();

            if (ret_code.HasValue)
            {
                bp.RemoteId = -1;
                bp.State    = BreakpointState.Disabled;
            }

            return(res);
        }