Exemple #1
0
        public void Dispose()
        {
            Attached = null;
            Detached = null;

            DebuggedCommand.Dispose();
            _debuggedSessionCommand.Dispose();
            _debuggerSessionCommand.Dispose();
            _debuggerConnection.Dispose();

            TraceLog.WriteLine("Debugger disposed. ");
        }
Exemple #2
0
        public async Task Start(CancellationToken cancellationToken)
        {
            _debuggedSessionCommand.CommandText = OracleDatabaseCommands.StartDebuggee;
            _debuggedSessionCommand.AddSimpleParameter("DEBUG_SESSION_ID", null, TerminalValues.Varchar2, 12);
            var debuggedSessionIdParameter = _debuggedSessionCommand.Parameters[0];

            await _debuggedSessionCommand.ExecuteNonQueryAsynchronous(cancellationToken);

            _debuggerSessionId = ((OracleString)debuggedSessionIdParameter.Value).Value;

            TraceLog.WriteLine($"Target debug session initialized. Debug session ID = {_debuggerSessionId}");

            await Attach(cancellationToken);

            TraceLog.WriteLine("Debugger attached. ");

            var attachTask = Synchronize(cancellationToken).ContinueWith(AfterSynchronized, cancellationToken, TaskContinuationOptions.OnlyOnRanToCompletion);

            _debuggedAction = DebuggedCommand.ExecuteNonQueryAsynchronous(cancellationToken);
            TraceLog.WriteLine("Debugged action started. ");

            await attachTask;
        }