public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command) { AspNetExecutionCommand cmd = (AspNetExecutionCommand)command; MonoDebuggerStartInfo startInfo = MonoDebuggerSessionFactory.CreateDebuggerStartInfo(cmd.TargetRuntime); string xspPath = Path.Combine(startInfo.MonoPrefix, "lib" + Path.DirectorySeparatorChar + "mono" + Path.DirectorySeparatorChar); if (cmd.ClrVersion == ClrVersion.Net_1_1) { xspPath += Path.Combine("1.0", "xsp.exe"); } else { xspPath += Path.Combine("2.0", "xsp2.exe"); } startInfo.IsXsp = true; startInfo.UserCodeOnly = true; startInfo.Command = xspPath; startInfo.WorkingDirectory = cmd.BaseDirectory; startInfo.Arguments = cmd.XspParameters.GetXspParameters().Trim(); string binDir = Path.Combine(cmd.BaseDirectory, "bin"); startInfo.UserModules = new List <string> (); foreach (string file in Directory.GetFiles(binDir)) { if (file.EndsWith(".dll") || file.EndsWith(".exe")) { startInfo.UserModules.Add(file); } } return(startInfo); }
public bool CanDebugCommand(ExecutionCommand command) { DotNetExecutionCommand cmd = command as DotNetExecutionCommand; if (cmd != null) { return(cmd.TargetRuntime == null || cmd.TargetRuntime.RuntimeId == "MS.NET"); } AspNetExecutionCommand acmd = command as AspNetExecutionCommand; if (acmd != null) { return(acmd.TargetRuntime == null || acmd.TargetRuntime.RuntimeId == "MS.NET"); } return(false); }
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(); }
public bool CanDebugCommand(ExecutionCommand command) { AspNetExecutionCommand cmd = command as AspNetExecutionCommand; return(cmd != null && MonoDebuggerSessionFactory.DebuggingSupported(cmd.TargetRuntime)); }