예제 #1
0
        async Task <bool> RemoveBreakpoint(MessageId msg_id, JObject args, CancellationToken token)
        {
            var bpid = args? ["breakpointId"]?.Value <string> ();

            if (!Breakpoint.TryParseId(bpid, out var the_id))
            {
                return(false);
            }

            var context = GetContext(msg_id);
            var bp      = context.Breakpoints.FirstOrDefault(b => b.LocalId == the_id);

            if (bp == null)
            {
                Log("info", $"Could not find dotnet bp with id {the_id}");
                return(false);
            }

            context.Breakpoints.Remove(bp);
            //FIXME verify result (and log?)
            var res = await RemoveBreakpoint(msg_id, bp, token);

            return(true);
        }