2
// MoonlightSoftDebuggerEngine.cs
5
// Michael Hutchinson <mhutchinson@novell.com>
7
// Copyright (c) 2009 Novell, Inc. (http://www.novell.com)
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
using System.Collections.Generic;
30
using MonoDevelop.Debugger;
31
using MonoDevelop.Core;
32
using MonoDevelop.Core.Execution;
33
using MonoDevelop.Moonlight;
34
using Mono.Debugging.Client;
35
using MonoDevelop.Debugger.Soft;
38
namespace MonoDevelop.Debugger.Soft.Moonlight
40
public class MoonlightSoftDebuggerEngine: IDebuggerEngine
44
return "Mono.Debugger.Soft.Moonlight";
48
public bool CanDebugCommand (ExecutionCommand command)
50
if (PropertyService.IsMac || PropertyService.IsWindows)
53
var cmd = command as MoonlightExecutionCommand;
54
return cmd != null && cmd.Url.StartsWith ("file://");
57
public DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command)
59
var cmd = (MoonlightExecutionCommand) command;
60
var msi = new MoonlightDebuggerStartInfo (cmd.AppName, cmd.Url);
61
msi.SetUserAssemblies (cmd.UserAssemblyPaths);
65
public DebuggerFeatures SupportedFeatures {
67
return DebuggerFeatures.Breakpoints |
68
DebuggerFeatures.Pause |
69
DebuggerFeatures.Stepping |
70
DebuggerFeatures.DebugFile |
71
DebuggerFeatures.Catchpoints;
75
public DebuggerSession CreateSession ()
77
return new MoonlightSoftDebuggerSession ();
80
public ProcessInfo[] GetAttachableProcesses ()
82
return new ProcessInfo[0];
87
return "Mono Soft Debugger for Moonlight";
92
class MoonlightDebuggerStartInfo : RemoteDebuggerStartInfo
94
public string Url { get; private set; }
96
public MoonlightDebuggerStartInfo (string appName, string url)
97
: base (appName, IPAddress.Loopback, 10000)