Example #1
0
        /// <summary>
        /// Attaches a debugger. This usually should be called by the debugger itself and not by user code.
        /// </summary>
        /// <param name="debugger">The debugger object.</param>
        public void AttachDebugger(IDebugger debugger)
        {
            m_Debugger = debugger;
            m_MainProcessor.AttachDebugger(debugger);

            foreach (SourceCode src in m_Sources)
            {
                SignalSourceCodeChange(src);
            }

            SignalByteCodeChange();
        }
Example #2
0
        /// <summary>
        /// Attaches a debugger. This usually should be called by the debugger itself and not by user code.
        /// </summary>
        /// <param name="debugger">The debugger object.</param>
        public void AttachDebugger(IDebugger debugger)
        {
            if (!m_isAlive)
            {
                throw new InvalidOperationException(string.Format("Attempting to attach a debugger on dead Script [{0}]", FriendlyName));
            }
            DebuggerEnabled = true;
            m_Debugger      = debugger;
            m_MainProcessor.AttachDebugger(debugger);

            foreach (SourceCode src in m_Sources)
            {
                SignalSourceCodeChange(src);
            }

            SignalByteCodeChange();
        }
Example #3
0
        /// <summary>
        /// Attaches a debugger. This usually should be called by the debugger itself and not by user code.
        /// </summary>
        /// <param name="debugger">The debugger object.</param>
        public void AttachDebugger(IDebugger debugger)
        {
            DebuggerEnabled = true;

            if (debugger != m_Debugger)
            {
                DetachDebugger();

                m_Debugger = debugger;
                m_MainProcessor.AttachDebugger(debugger);

                foreach (SourceCode src in m_Sources)
                {
                    SignalSourceCodeChange(src);
                }

                SignalByteCodeChange();
            }
        }