Example #1
0
        // Detach is called when debugging is stopped and the process was attached to (as opposed to launched)
        // or when one of the Detach commands are executed in the UI.
        public int Detach()
        {
            _breakpointManager.ClearBoundBreakpoints();

            _pollThread.RunOperation(() => _debuggedProcess.CmdDetach());
            _debuggedProcess.Detach();
            return(Constants.S_OK);
        }
Example #2
0
        // Detach is called when debugging is stopped and the process was attached to (as opposed to launched)
        // or when one of the Detach commands are executed in the UI.
        public int Detach()
        {
            _breakpointManager.ClearBoundBreakpoints();

            _pollThread.RunOperation(new Operation(delegate
            {
                _debuggedProcess.Detach();
            }));

            return(Constants.S_OK);
        }
Example #3
0
        // Detach is called when debugging is stopped and the process was attached to (as opposed to launched)
        // or when one of the Detach commands are executed in the UI.
        public int Detach()
        {
            _breakpointManager.ClearBoundBreakpoints();

            try
            {
                _pollThread.RunOperation(() => _debuggedProcess.CmdDetach());
                _debuggedProcess.Detach();
            }
            catch (DebuggerDisposedException)
            {
                // Detach command could cause DebuggerDisposedException and we ignore that.
            }

            return(Constants.S_OK);
        }
Example #4
0
        // Detach is called when debugging is stopped and the process was attached to (as opposed to launched)
        // or when one of the Detach commands are executed in the UI.
        public int Detach()
        {
            _breakpointManager.ClearBoundBreakpoints();

            try
            {
                _pollThread.RunOperation(() => _debuggedProcess.CmdDetach());
            }
            catch (DebuggerDisposedException e) when(e.AbortedCommand != "-target-detach")
            {
                // Detach command could cause DebuggerDisposedException and we ignore that.
                throw;
            }

            _debuggedProcess.Detach();
            return(Constants.S_OK);
        }