Example #1
0
        public async Task <DebugBreakpoint> CreateBreakpointAsync(DebugBreakpointLocation location, CancellationToken cancellationToken = default(CancellationToken))
        {
            ThrowIfDisposed();

            await TaskUtilities.SwitchToBackgroundThread();

            await InitializeAsync(cancellationToken);

            DebugBreakpoint bp;

            if (!_breakpoints.TryGetValue(location, out bp))
            {
                bp = new DebugBreakpoint(this, location);
                _breakpoints.Add(location, bp);
            }

            await bp.SetBreakpointAsync(cancellationToken);

            return(bp);
        }
Example #2
0
 internal void RemoveBreakpoint(DebugBreakpoint breakpoint)
 {
     Trace.Assert(breakpoint.Session == this);
     _breakpoints.Remove(breakpoint.Location);
 }