Beispiel #1
0
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (AspNetExecutionCommand)command;

            var runtime   = (MonoTargetRuntime)cmd.TargetRuntime;
            var startInfo = new SoftDebuggerStartInfo(runtime.Prefix, runtime.EnvironmentVariables)
            {
                WorkingDirectory = cmd.BaseDirectory,
                Arguments        = cmd.XspParameters.GetXspParameters().Trim(),
            };

            FilePath prefix = runtime.Prefix;

            if (MonoDevelop.Core.PropertyService.IsWindows)
            {
                startInfo.Command = (cmd.ClrVersion == ClrVersion.Net_1_1)
                                        ? prefix.Combine("lib", "mono", "1.0", "winhack", "xsp.exe")
                                        : prefix.Combine("lib", "mono", "2.0", "winhack", "xsp2.exe");
            }
            else
            {
                startInfo.Command = (cmd.ClrVersion == ClrVersion.Net_1_1)
                                        ? prefix.Combine("lib", "mono", "1.0", "xsp.exe")
                                        : prefix.Combine("lib", "mono", "2.0", "xsp2.exe");
            }

            string error;

            startInfo.UserAssemblyNames = SoftDebuggerEngine.GetAssemblyNames(cmd.UserAssemblyPaths, out error);
            startInfo.LogMessage        = error;

            return(startInfo);
        }
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (MoonlightExecutionCommand)command;
            var msi = new MoonlightDebuggerStartInfo(cmd.AppName, cmd.Url);

            SoftDebuggerEngine.SetUserAssemblyNames(msi, cmd.UserAssemblyPaths);
            return(msi);
        }
Beispiel #3
0
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (MonoMacExecutionCommand)command;

            var startInfo = new MonoMacDebuggerStartInfo(cmd);

            SoftDebuggerEngine.SetUserAssemblyNames(startInfo, cmd.UserAssemblyPaths);
            return(startInfo);
        }
Beispiel #4
0
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (MonoDroidExecutionCommand)command;

            //var startInfo = new MonoDroidDebuggerStartInfo (MonoDroidSettings.GetDebuggerHostIP (false), cmd);
            var startInfo = new MonoDroidDebuggerStartInfo(IPAddress.Loopback, cmd);

            SoftDebuggerEngine.SetUserAssemblyNames(startInfo, cmd.UserAssemblyPaths);
            return(startInfo);
        }
Beispiel #5
0
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (IPhoneExecutionCommand)command;

            var startInfo = new IPhoneDebuggerStartInfo(IPhoneSettings.GetDebuggerHostIP(cmd.Simulator),
                                                        IPhoneSettings.DebuggerPort,
                                                        IPhoneSettings.DebuggerOutputPort, cmd);

            SoftDebuggerEngine.SetUserAssemblyNames(startInfo, cmd.UserAssemblyPaths);
            return(startInfo);
        }
        public override DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd     = (AspNetExecutionCommand)command;
            var evars   = new Dictionary <string, string>(cmd.EnvironmentVariables);
            var runtime = (MonoTargetRuntime)cmd.TargetRuntime;

            foreach (var v in runtime.EnvironmentVariables)
            {
                if (!evars.ContainsKey(v.Key))
                {
                    evars.Add(v.Key, v.Value);
                }
            }

            //HACK: work around Mono trying to create registry in non-writable location
            if (cmd.TargetRuntime is MonoTargetRuntime && !Platform.IsWindows)
            {
                evars ["MONO_REGISTRY_PATH"] = UserProfile.Current.TempDir.Combine("aspnet-registry");
            }

            var startInfo = new SoftDebuggerStartInfo(runtime.Prefix, evars)
            {
                WorkingDirectory = cmd.BaseDirectory,
                Arguments        = cmd.XspParameters.GetXspParameters().Trim(),
            };

            var xspName = AspNetExecutionHandler.GetXspName(cmd);

            FilePath fxDir   = GetFxDir(runtime, cmd.ClrVersion);
            FilePath xspPath = fxDir.Combine(xspName).ChangeExtension(".exe");

            //no idea why xsp is sometimes relocated to a "winhack" dir on Windows
            if (MonoDevelop.Core.Platform.IsWindows && !File.Exists(xspPath))
            {
                var winhack = fxDir.Combine("winhack");
                if (Directory.Exists(winhack))
                {
                    xspPath = winhack.Combine(xspName).ChangeExtension(".exe");
                }
            }

            if (!File.Exists(xspPath))
            {
                throw new UserException(GettextCatalog.GetString(
                                            "The \"{0}\" web server cannot be started. Please ensure that it is installed.", xspName), null);
            }

            startInfo.Command = xspPath;
            SoftDebuggerEngine.SetUserAssemblyNames(startInfo, cmd.UserAssemblyPaths);

            return(startInfo);
        }
Beispiel #7
0
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var    cmd             = (MonoBrickExecutionCommand)command;
            string EV3IPAddress    = UserSettings.Instance.IPAddress;
            string EV3DebuggerPort = UserSettings.Instance.DebugPort;

            var debuggerAddress = IPAddress.Parse(EV3IPAddress);
            int debuggerPort    = int.Parse(EV3DebuggerPort);

            var startInfo = new MonoBrickSoftDebuggerStartInfo(debuggerAddress, debuggerPort, cmd);

            SoftDebuggerEngine.SetUserAssemblyNames(startInfo, cmd.UserAssemblyPaths);
            return(startInfo);
        }
        public DebuggerStartInfo CreateDebuggerStartInfo(ExecutionCommand command)
        {
            var cmd = (AspNetExecutionCommand)command;

            var runtime   = (MonoTargetRuntime)cmd.TargetRuntime;
            var startInfo = new SoftDebuggerStartInfo(runtime.Prefix, runtime.EnvironmentVariables)
            {
                WorkingDirectory = cmd.BaseDirectory,
                Arguments        = cmd.XspParameters.GetXspParameters().Trim(),
            };

            var xspName = AspNetExecutionHandler.GetXspName(cmd);

            FilePath fxDir   = GetFxDir(runtime, cmd.ClrVersion);
            FilePath xspPath = fxDir.Combine(xspName).ChangeExtension(".exe");

            //no idea why xsp is sometimes relocated to a "winhack" dir on Windows
            if (MonoDevelop.Core.Platform.IsWindows && !File.Exists(xspPath))
            {
                var winhack = fxDir.Combine("winhack");
                if (Directory.Exists(winhack))
                {
                    xspPath = winhack.Combine(xspName).ChangeExtension(".exe");
                }
            }

            if (!File.Exists(xspPath))
            {
                throw new UserException(GettextCatalog.GetString(
                                            "The \"{0}\" web server cannot be started. Please ensure that it is installed.", xspName), null);
            }

            startInfo.Command = xspPath;
            SoftDebuggerEngine.SetUserAssemblyNames(startInfo, cmd.UserAssemblyPaths);

            return(startInfo);
        }
Beispiel #9
0
        public bool CanDebugCommand(ExecutionCommand command)
        {
            var cmd = command as AspNetExecutionCommand;

            return(cmd != null && SoftDebuggerEngine.CanDebugRuntime(cmd.TargetRuntime));
        }
        public override bool CanDebugCommand(ExecutionCommand cmd)
        {
            var command = cmd as AspNetExecutionCommand;

            return(command != null && SoftDebuggerEngine.CanDebugRuntime(command.TargetRuntime));
        }