Beispiel #1
0
        void Trace(string format, params object[] args)
        {
            var text = string.Format(format, args);

            Console.WriteLine(text);
            log.WriteLine(text);
        }
Beispiel #2
0
        public void Initialize(CompositionContainer composition)
        {
            sourcesWindow = composition.GetExportedValue <SourcesWindow> ();
            sourceWindow  = composition.GetExportedValue <SourceWindow> ();
            windowManager.Add(sourcesWindow);
            windowManager.Add(sourceWindow);
            log = composition.GetExportedValue <LogWindow> ();
//			windowManager.Add (log);
            windowManager.Add(composition.GetExportedValue <CallstackWindow> ());
            windowManager.Add(composition.GetExportedValue <LocalsWindow> ());
            windowManager.Add(composition.GetExportedValue <BreakpointsWindow> ());
            windowManager.Add(composition.GetExportedValue <ExecutionWindow> ());

            if (HasArguments())
            {
                session.Port = SdbPortFromCommandLine();
            }

            //else
            //{
            //    var f = new StreamReader (File.Open (@"C:\debug.log", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
            //    var str = f.ReadLine ();
            //    f.Close ();
            //    session.Port = int.Parse (str.Substring ("Listening on 0.0.0.0:".Length, 5));
            //}

            log.WriteLine("Connecting to " + session.Port);

            Camera.main.backgroundColor = new Color(0.125f, 0.125f, 0.125f, 0);
            Application.runInBackground = true;

            AdjustLayout();

//			if (!HasArguments ())
//				return;

            session.TraceCallback += s => Trace(s);
            typeProvider.BasePath  = ProjectPathFromCommandLine();


            sourcesWindow.StartRefreshing();

            session.Start();
        }
Beispiel #3
0
        public void Initialize(CompositionContainer composition)
        {
            sourcesWindow = composition.GetExportedValue<SourcesWindow> ();
            sourceWindow = composition.GetExportedValue<SourceWindow> ();
            windowManager.Add (sourcesWindow);
            windowManager.Add (sourceWindow);
            log = composition.GetExportedValue<LogWindow> ();
            //			windowManager.Add (log);
            windowManager.Add (composition.GetExportedValue<CallstackWindow> ());
            windowManager.Add (composition.GetExportedValue<LocalsWindow> ());
            windowManager.Add (composition.GetExportedValue<BreakpointsWindow> ());
            windowManager.Add (composition.GetExportedValue<ExecutionWindow> ());

            if (HasArguments ())
                session.Port = SdbPortFromCommandLine ();

            //else
            //{
            //    var f = new StreamReader (File.Open (@"C:\debug.log", FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
            //    var str = f.ReadLine ();
            //    f.Close ();
            //    session.Port = int.Parse (str.Substring ("Listening on 0.0.0.0:".Length, 5));
            //}

            log.WriteLine ("Connecting to " + session.Port);

            Camera.main.backgroundColor = new Color (0.125f, 0.125f, 0.125f, 0);
            Application.runInBackground = true;

            AdjustLayout ();

            //			if (!HasArguments ())
            //				return;

            session.TraceCallback += s => Trace (s);
            typeProvider.BasePath = ProjectPathFromCommandLine ();

            sourcesWindow.StartRefreshing ();

            session.Start ();
        }