diff --git a/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.Compiler.Debug.csproj b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.Compiler.Debug.csproj
new file mode 100644
index 000000000..67ae0d07f
--- /dev/null
+++ b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.Compiler.Debug.csproj
@@ -0,0 +1,91 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.30729
+ 2.0
+ {9998B4EA-385E-4DA2-8905-2BBEB5B2C6E2}
+ Library
+ Properties
+ Cosmos.Compiler.Debug
+ Cosmos.Compiler.Debug
+ v3.5
+ 512
+ true
+ Cosmos.snk
+ SAK
+ SAK
+ SAK
+ SAK
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+ true
+ bin\Debug\
+ DEBUG;TRACE
+ full
+ x86
+ true
+ GlobalSuppressions.cs
+ prompt
+
+
+ bin\x86\Release\
+ TRACE
+ true
+ pdbonly
+ x86
+ true
+ GlobalSuppressions.cs
+ prompt
+
+
+
+
+ 3.5
+
+
+ 3.5
+
+
+ 3.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.Compiler.Debug.csproj.vspscc b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.Compiler.Debug.csproj.vspscc
new file mode 100644
index 000000000..feffdecaa
--- /dev/null
+++ b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.Compiler.Debug.csproj.vspscc
@@ -0,0 +1,10 @@
+""
+{
+"FILE_VERSION" = "9237"
+"ENLISTMENT_CHOICE" = "NEVER"
+"PROJECT_FILE_RELATIVE_PATH" = ""
+"NUMBER_OF_EXCLUDED_FILES" = "0"
+"ORIGINAL_PROJECT_FILE_PATH" = ""
+"NUMBER_OF_NESTED_PROJECTS" = "0"
+"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
+}
diff --git a/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.snk b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.snk
new file mode 100644
index 000000000..68808d392
Binary files /dev/null and b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Cosmos.snk differ
diff --git a/source2/IL2PCU/Cosmos.IL2CPU.Debug/Enums.cs b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Enums.cs
new file mode 100644
index 000000000..7bde8fbbb
--- /dev/null
+++ b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Enums.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Cosmos.Compiler.Debug {
+ // Messages from Guest to Host
+ public enum MsgType: byte {
+ Noop = 0
+ , TracePoint = 1
+ , Message = 2
+ , BreakPoint = 3
+ , Error = 4
+ , Pointer = 5
+ // This is sent once on start up. The first call to debug stub sends this.
+ // Host can then respond with a series of set breakpoints etc, ie ones that were set before running.
+ , Ready = 6
+ }
+
+ // Messages from Host to Guest
+ public enum Command : byte {
+ Noop = 0
+ , TraceOff = 1, TraceOn = 2
+ // Break command is also for continuing from breakstate.
+ , Break = 3
+ , Step = 4
+ , BreakOnAddress = 5
+ }
+}
diff --git a/source2/IL2PCU/Cosmos.IL2CPU.Debug/Properties/AssemblyInfo.cs b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..e4f95072c
--- /dev/null
+++ b/source2/IL2PCU/Cosmos.IL2CPU.Debug/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Cosmos.IL2CPU.Debug")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("Cosmos.IL2CPU.Debug")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2008")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("24d1f09d-81a3-485a-8926-1f8b0ccce273")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/source2/IL2PCU/Cosmos.IL2CPU.Debug/ReadMe.html b/source2/IL2PCU/Cosmos.IL2CPU.Debug/ReadMe.html
new file mode 100644
index 000000000..62fcee075
--- /dev/null
+++ b/source2/IL2PCU/Cosmos.IL2CPU.Debug/ReadMe.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+ Cosmos.Debug contains common classes and enums that runs on both Windows and
+ Cosmos. The Debugger uses it to receive messages from the debugstub in Cosmos,
+ and Cosmos uses it to compile into the debug stub.
+
+ Because of this extreme care must be take of which assemblies are linked and
+ this assembly should not link in any other Cosmos assemblies.
+
+
+
\ No newline at end of file