Exemple #1
0
        private static void Main(string[] args)
        {
            MonoLogger.Setup();

            using (var server = new MonoDebugServer())
            {
                server.StartAnnouncing();
                server.Start();

                server.WaitForExit();
            }
        }
        private async void StartLocalServer()
        {
            try
            {
                if (server != null)
                {
                    server.Stop();
                    server = null;
                }

                monoExtension.BuildSolution();

                using (server = new MonoDebugServer())
                {
                    server.Start();
                    await monoExtension.AttachDebugger(MonoProcess.GetLocalIp().ToString());
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
                if (server != null)
                    server.Stop();
                MessageBox.Show(ex.Message, "MonoDebugger", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }