public DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command) { var cmd = command as CryEngineExecutionCommand; if (null == cmd){ return null; } var msi = new CryEngineDebuggerStartInfo("CryEngine"); // msi.SetUserAssemblies (null); msi.Arguments = string.Format ("-projectPath \"{0}\"", cmd.ProjectPath); return msi; }
/// <summary> /// Launch application /// </summary> void StartSandbox (CryEngineDebuggerStartInfo dsi) { if (cryProcess != null) throw new InvalidOperationException ("CryENGINE Sandbox already started"); var processPath = Path.Combine(CryEngineProjectServiceExtension.WorkingDir, "Editor.exe"); var psi = new ProcessStartInfo (processPath) { Arguments = dsi.Arguments, UseShellExecute = false, WorkingDirectory = Path.GetDirectoryName (processPath) }; // Pass through environment foreach (DictionaryEntry env in Environment.GetEnvironmentVariables ()) { Console.WriteLine ("{0} = \"{1}\"", env.Key, env.Value); psi.EnvironmentVariables[(string)env.Key] = (string)env.Value; } foreach (var env in dsi.EnvironmentVariables) { Console.WriteLine ("{0} = \"{1}\"", env.Key, env.Value); psi.EnvironmentVariables[env.Key] = env.Value; } // Connect back to soft debugger client psi.Arguments += "-DEBUG"; //psi.EnvironmentVariables.Add ("MONO_ARGUMENTS",string.Format ("--debugger-agent=transport=dt_socket,address=127.0.0.1:{0},embedding=1", clientPort)); //psi.EnvironmentVariables.Add ("MONO_LOG_LEVEL","debug"); cryProcess = Process.Start (psi); cryProcess.EnableRaisingEvents = true; cryProcess.Exited += delegate { cryProcess = null; EndSession (); }; }