当前位置: 首页>>代码示例>>C#>>正文


C# Client.DebuggerStartInfo类代码示例

本文整理汇总了C#中Mono.Debugging.Client.DebuggerStartInfo的典型用法代码示例。如果您正苦于以下问题:C# DebuggerStartInfo类的具体用法?C# DebuggerStartInfo怎么用?C# DebuggerStartInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DebuggerStartInfo类属于Mono.Debugging.Client命名空间,在下文中一共展示了DebuggerStartInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetConnectingMessage

		protected override string GetConnectingMessage (DebuggerStartInfo startInfo)
		{
			var dsi = (TizenSoftDebuggerStartInfo) startInfo;
			var dra = (SoftDebuggerRemoteArgs) dsi.StartArgs;

			return string.Format ("Waiting for debugger to connect on {0}:{1}...", dra.Address, dra.DebugPort);
		}
开发者ID:kitsilanosoftware,项目名称:MonoDevelop.Tizen,代码行数:7,代码来源:TizenSoftDebuggerSession.cs

示例2: CreateDebuggerStartInfo

		public DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command)
		{
			DotNetExecutionCommand cmd = command as DotNetExecutionCommand;
			if (cmd != null) {
				DebuggerStartInfo startInfo = new DebuggerStartInfo ();
				startInfo.Command = cmd.Command;
				startInfo.Arguments = cmd.Arguments;
				startInfo.WorkingDirectory = cmd.WorkingDirectory;
				if (cmd.EnvironmentVariables.Count > 0) {
					foreach (KeyValuePair<string, string> val in cmd.EnvironmentVariables)
						startInfo.EnvironmentVariables[val.Key] = val.Value;
				}
				return startInfo;
			}
			AspNetExecutionCommand acmd = command as AspNetExecutionCommand;
			if (acmd != null) {
				DebuggerStartInfo startInfo = new DebuggerStartInfo ();
				string xspName = (acmd.ClrVersion == ClrVersion.Net_1_1) ? "xsp" : "xsp2";
				string xspPath = acmd.TargetRuntime.GetToolPath (acmd.TargetFramework, xspName);
				if (!File.Exists (xspPath))
					throw new UserException (string.Format ("The \"{0}\" web server cannot be started. Please ensure that it is installed.", xspName), null);

				startInfo.Command = xspPath;
				startInfo.Arguments = acmd.XspParameters.GetXspParameters () + " --nonstop";
				startInfo.WorkingDirectory = acmd.BaseDirectory;

				// Set DEVPATH when running on Windows (notice that this has no effect unless
				// <developmentMode developerInstallation="true" /> is set in xsp2.exe.config

				startInfo.EnvironmentVariables["DEVPATH"] = Path.GetDirectoryName (xspPath);
				return startInfo;
			}
			throw new NotSupportedException ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:34,代码来源:CorDebuggerEngine.cs

示例3: OnRun

		/*protected override string GetConnectingMessage (SoftDebuggerStartInfo dsi)
		{
			return string.Format ("Waiting for debugger to connect on {0}:{1}...", dsi.Address, dsi.DebugPort);
		}*/
		protected override void OnRun(DebuggerStartInfo startInfo)
		{
			var dsi = (MonoBrickSoftDebuggerStartInfo)startInfo;
			StartProcess(dsi);
			Thread.Sleep(500);
			StartConnecting(dsi);
		}
开发者ID:RoninWest,项目名称:monoev3,代码行数:11,代码来源:MonoBrickAddinDebuggerSession.cs

示例4: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			var dsi = (MoonlightDebuggerStartInfo) startInfo;
			int assignedDebugPort;
			StartListening (dsi, out assignedDebugPort);
			StartBrowserProcess (dsi, assignedDebugPort);
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:7,代码来源:MoonlightSoftDebuggerSession.cs

示例5: OnRun

        /// <summary>
        ///   Called when debugger runs.
        /// </summary>
        /// <param name = "startInfo">The start info.</param>
        protected override void OnRun(DebuggerStartInfo startInfo)
        {
            MonobjcDebuggerStartInfo dsi = (MonobjcDebuggerStartInfo)startInfo;
            SoftDebuggerRemoteArgs startArgs = (SoftDebuggerRemoteArgs)dsi.StartArgs;
            MonobjcExecutionCommand command = dsi.ExecutionCommand;

            int assignedPort;
            this.StartListening (dsi, out assignedPort);

            // Create the start information
            ProcessStartInfo psi = new ProcessStartInfo (command.CommandString) { Arguments = command.CommandLineParameters, RedirectStandardOutput = true, RedirectStandardError = true, RedirectStandardInput = true, UseShellExecute = false };
            psi.EnvironmentVariables ["MONO_OPTIONS"] = string.Format ("--debug --debugger-agent=transport=dt_socket,address={0}:{1}", startArgs.Address, assignedPort);

            // Try to start the process
            this.process = Process.Start (psi);
            if (this.process == null) {
                this.EndSession ();
                return;
            }

            // Connect the stdout and stderr to the MonoDevelop's output
            this.ConnectOutput (this.process.StandardOutput, false);
            this.ConnectOutput (this.process.StandardError, true);

            // When process exits, end the session
            this.process.EnableRaisingEvents = true;
            this.process.Exited += delegate {
                this.EndSession ();
                this.process = null;
            };
        }
开发者ID:Monobjc,项目名称:monobjc-monodevelop,代码行数:35,代码来源:MonobjcDebuggerSession.cs

示例6: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			lock (gdbLock) {
				// Create a script to be run in a terminal
				string script = Path.GetTempFileName ();
				string ttyfile = Path.GetTempFileName ();
				string ttyfileDone = ttyfile + "_done";
				string tty;
				
				try {
					File.WriteAllText (script, "tty > " + ttyfile + "\ntouch " + ttyfileDone + "\nsleep 10000d");
					Mono.Unix.Native.Syscall.chmod (script, FilePermissions.ALLPERMS);
					
					console = Runtime.ProcessService.StartConsoleProcess (script, "", ".", ExternalConsoleFactory.Instance.CreateConsole (true), null);
					DateTime tim = DateTime.Now;
					while (!File.Exists (ttyfileDone)) {
						System.Threading.Thread.Sleep (100);
						if ((DateTime.Now - tim).TotalSeconds > 10)
							throw new InvalidOperationException ("Console could not be created.");
					}
					tty = File.ReadAllText (ttyfile).Trim (' ','\n');
				} finally {
					try {
						if (File.Exists (script))
							File.Delete (script);
						if (File.Exists (ttyfile))
							File.Delete (ttyfile);
						if (File.Exists (ttyfileDone))
							File.Delete (ttyfileDone);
					} catch {
						// Ignore
					}
				}
				
				StartGdb ();
				
				// Initialize the terminal
				RunCommand ("-inferior-tty-set", Escape (tty));
				
				try {
					RunCommand ("-file-exec-and-symbols", Escape (startInfo.Command));
				} catch {
					FireTargetEvent (TargetEventType.TargetExited, null);
					throw;
				}

				RunCommand ("-environment-cd", Escape (startInfo.WorkingDirectory));
				
				// Set inferior arguments
				if (!string.IsNullOrEmpty (startInfo.Arguments))
					RunCommand ("-exec-arguments", startInfo.Arguments);
				
				currentProcessName = startInfo.Command + " " + startInfo.Arguments;
				
				CheckIsMonoProcess ();
				OnStarted ();
				
				RunCommand ("-exec-run");
			}
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:60,代码来源:GdbSession.cs

示例7: OnRun

        protected override void OnRun(DebuggerStartInfo startInfo)
        {
            if (process != null)
                throw new InvalidOperationException("Already debugging!");

            var dsi = (MonobjcDebuggerStartInfo) startInfo;
            var cmd = dsi.ExecutionCommand;

            StartListening(dsi);

            var psi = new System.Diagnostics.ProcessStartInfo(cmd.CommandString) {
                Arguments = cmd.Arguments,
                RedirectStandardOutput = true,
                RedirectStandardError = true,
                RedirectStandardInput = true,
                UseShellExecute = false
            };
            psi.EnvironmentVariables["MONO_OPTIONS"] = String.Format("--debug --debugger-agent=transport=dt_socket,address={0}:{1}", dsi.Address, dsi.DebugPort);

            foreach (var kv in cmd.EnvironmentVariables)
                psi.EnvironmentVariables[kv.Key] = kv.Value;

            process = System.Diagnostics.Process.Start(psi);

            ConnectOutput(process.StandardOutput, false);
            ConnectOutput(process.StandardError, true);

            process.EnableRaisingEvents = true;
            process.Exited += delegate {
                EndSession();
                process = null;
            };
        }
开发者ID:robley,项目名称:monodevelop-monobjc,代码行数:33,代码来源:MonobjcDebuggerSession.cs

示例8: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			started = true;
			MonoDebuggerStartInfo info = (MonoDebuggerStartInfo) startInfo;
			controller.StartDebugger (info);
			InitMdbVersion (info.MonoPrefix);
			controller.DebuggerServer.Run (info, Options);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:MonoDebuggerSession.cs

示例9: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			var dsi = (IPhoneDebuggerStartInfo) startInfo;
			var cmd = dsi.ExecutionCommand;
			if (cmd.Simulator)
				StartSimulatorProcess (cmd);
			StartListening (dsi);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:8,代码来源:IPhoneDebuggerSession.cs

示例10: OnRun

        protected override void OnRun(DebuggerStartInfo startInfo)
        {
            var dsi = (CemonoDebuggerStartInfo)startInfo;

            int debugPort;
            StartListening(dsi, out debugPort);

            // Start process
        }
开发者ID:samneirinck,项目名称:cemono,代码行数:9,代码来源:CemonoSoftDebuggerSession.cs

示例11: OnRun

		protected override void OnRun(DebuggerStartInfo startInfo)
		{
			var dsi = (SoftDebuggerStartInfo)startInfo;
            if (dsi.StartArgs is SoftDebuggerConnectArgs)
			    base.StartConnecting(dsi);
            else if (dsi.StartArgs is SoftDebuggerListenArgs)
                base.StartListening(dsi);
            else
                throw new NotImplementedException();
		}
开发者ID:cg123,项目名称:xenko,代码行数:10,代码来源:XenkoRemoteSoftDebuggerSession.cs

示例12: CreateDebuggerStartInfo

		public override DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command)
		{
			NativeExecutionCommand pec = (NativeExecutionCommand) command;
			DebuggerStartInfo startInfo = new DebuggerStartInfo ();
			startInfo.Command = pec.Command;
			startInfo.Arguments = pec.Arguments;
			startInfo.WorkingDirectory = pec.WorkingDirectory;
			if (pec.EnvironmentVariables.Count > 0) {
				foreach (KeyValuePair<string,string> val in pec.EnvironmentVariables)
					startInfo.EnvironmentVariables [val.Key] = val.Value;
			}
			return startInfo;
		}
开发者ID:llucenic,项目名称:MonoDevelop.Debugger.Gdb.D,代码行数:13,代码来源:GdbSessionFactory.cs

示例13: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			if (exited)
				throw new InvalidOperationException ("Already exited");
			
			var dsi = (SoftDebuggerStartInfo) startInfo;
			var runtime = Path.Combine (Path.Combine (dsi.MonoRuntimePrefix, "bin"), "mono");
			RegisterUserAssemblies (dsi.UserAssemblyNames);
			
			var psi = new System.Diagnostics.ProcessStartInfo (runtime) {
				Arguments = string.Format ("\"{0}\" {1}", dsi.Command, dsi.Arguments),
				WorkingDirectory = dsi.WorkingDirectory,
				RedirectStandardOutput = true,
				RedirectStandardError = true,
				UseShellExecute = false,
				CreateNoWindow = true,
			};
			
			LaunchOptions options = null;
			
			if (dsi.UseExternalConsole && dsi.ExternalConsoleLauncher != null) {
				options = new LaunchOptions ();
				options.CustomTargetProcessLauncher = dsi.ExternalConsoleLauncher;
				psi.RedirectStandardOutput = false;
				psi.RedirectStandardError = false;
			}

			var sdbLog = Environment.GetEnvironmentVariable ("MONODEVELOP_SDB_LOG");
			if (!String.IsNullOrEmpty (sdbLog)) {
				options = options ?? new LaunchOptions ();
				options.AgentArgs = string.Format ("loglevel=1,logfile='{0}'", sdbLog);
			}
			
			foreach (var env in dsi.MonoRuntimeEnvironmentVariables)
				psi.EnvironmentVariables[env.Key] = env.Value;
			
			foreach (var env in startInfo.EnvironmentVariables)
				psi.EnvironmentVariables[env.Key] = env.Value;
			
			if (!String.IsNullOrEmpty (dsi.LogMessage))
				OnDebuggerOutput (false, dsi.LogMessage + "\n");

			OnConnecting (VirtualMachineManager.BeginLaunch (psi, HandleCallbackErrors (delegate (IAsyncResult ar) {
					HandleConnection (VirtualMachineManager.EndLaunch (ar));
				}),
				options
			));
		}
开发者ID:pgoron,项目名称:monodevelop,代码行数:48,代码来源:SoftDebuggerSession.cs

示例14: OnRun

		protected override void OnRun (DebuggerStartInfo startInfo)
		{
			var mfStartInfo = startInfo as MicroFrameworkDebuggerStartInfo;
			if (mfStartInfo == null)//This should never happen...
				throw new InvalidOperationException ();
			var command = mfStartInfo.MFCommand;
			var portDefinition = ((MicroFrameworkExecutionTarget)command.Target).PortDefinition;
			using (var deployEngine = new Engine (portDefinition)) {
				deployEngine.Start ();

				string newCommand = "/CorDebug_DeployDeviceName:" + portDefinition.PersistName;

				var listOfAseemblies = new ArrayList ();

				//TODO: Check if this is robust enough will "be" and "le" really always be in output folder?
				OutputDirectory = command.OutputDirectory;
				string dir = command.OutputDirectory;
				if (deployEngine.IsTargetBigEndian)
					dir = Path.Combine (dir, "be");
				else
					dir = Path.Combine (dir, "le");

				string[] files = Directory.GetFiles (dir, "*.pe");
				foreach (var file in files) {
					newCommand = "/load:" + file + " " + newCommand;
					using (var fs = new FileStream (file, FileMode.Open)) {
						byte[] data = new byte[fs.Length];
						fs.Read (data, 0, data.Length);
						listOfAseemblies.Add (data);
					}
				}
				startInfo.Command = newCommand;
				deployEngine.Deployment_Execute (listOfAseemblies, false, (str) => OnDebuggerOutput (false, "Deploy: " + str + Environment.NewLine));
				deployEngine.RebootDevice (Engine.RebootOption.RebootClrWaitForDebugger);
			}
			VsPackage.MessageCentre.Session = this;
			try {
				CorDebugProcess process = CorDebugProcess.CreateProcess (new DebugPortSupplier ().FindPort ("USB"), startInfo.Command);
				process.StartDebugging (this, false);
				// StartDebugging() will either get a connected device into a debuggable state and start the dispatch thread, or throw.
			} catch (ProcessExitException) {
				VsPackage.MessageCentre.DeploymentMsg (DiagnosticStrings.InitializeProcessFailedProcessDied);
			} catch (Exception ex) {
				VsPackage.MessageCentre.DeploymentMsg (DiagnosticStrings.InitializeProcessFailed);
				VsPackage.MessageCentre.InternalErrorMsg (false, ex.Message);
			}
		}
开发者ID:Roddoric,项目名称:Monkey.Robotics,代码行数:47,代码来源:MicroFrameworkDebuggerSession.cs

示例15: OnRun

        protected override void OnRun(DebuggerStartInfo startInfo)
        {
            try{
                if (startInfo == null) {
                    EndSession ();
                    return;
                }

                base.OnRun (startInfo);
            }catch (Exception ex) {
                Gtk.Application.Invoke (delegate {
                    using (var md = new MessageDialog (null, DialogFlags.Modal, MessageType.Info, ButtonsType.Ok, ex.Message)) {
                        md.Title = "CustomSoftDebuggerSession";
                        md.Run ();
                        md.Destroy ();
                    }
                });
            }
        }
开发者ID:Clancey,项目名称:SSHDebugger,代码行数:19,代码来源:clsSSHSoftDebuggerSession.cs


注:本文中的Mono.Debugging.Client.DebuggerStartInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。