forked from lucasmeijer/MonoDevelop.UnityMode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDebugging.cs
More file actions
41 lines (35 loc) · 869 Bytes
/
Copy pathDebugging.cs
File metadata and controls
41 lines (35 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using MonoDevelop.Components.Commands;
using MonoDevelop.Ide;
using MonoDevelop.Debugger;
using Mono.Debugging.Client;
using MonoDevelop.UnityMode;
using MonoDevelop.Debugger.Soft.Unity;
using System.Linq;
namespace MonoDevelop.UnityMode
{
public enum DebugCommands
{
DebugEditor
}
class DebugEditorHandler : CommandHandler
{
protected override void Run ()
{
Doit ();
}
public static void Doit()
{
var processInfo = new ProcessInfo (StartupOptions.UnityProcessId, "Unity");
var engines = DebuggingService.GetDebuggerEngines ();
var engine = engines.Where (e => e.Id == "MonoDevelop.Debugger.Soft.Unity").SingleOrDefault ();
if (engine == null)
return;
IdeApp.ProjectOperations.AttachToProcess (engine, processInfo );
}
protected override void Update (CommandInfo info)
{
info.Visible = true;
}
}
}