Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
New style api following vscode guidelines.
Browse files Browse the repository at this point in the history
Halt on exception seems to work.
Removed old attach.js and generate it from typescript version, using npm
script targets.
Refactored UnityDebugSession to follow naming conventions.
Unhandled exceptions is not supported yet.
  • Loading branch information
miniwolf committed May 7, 2018
1 parent 8ebd84f commit b48e046
Show file tree
Hide file tree
Showing 14 changed files with 1,124 additions and 519 deletions.
3 changes: 2 additions & 1 deletion .vscodeignore
Expand Up @@ -2,7 +2,8 @@
**
**/.DS_Store
**/.mdb
!attach.js
!MonoDebug/**
!attach.ts
!package.json
!bin/**
!Changelog.txt
Expand Down
Binary file modified External/Newtonsoft.Json.dll
Binary file not shown.
300 changes: 69 additions & 231 deletions External/Newtonsoft.Json.xml

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -9,9 +9,13 @@ clean:
$UNITY_DEBUG:
xbuild /p:Configuration=Release

build:
tsc -p ./typescript
@echo "build finished"

zip: $UNITY_DEBUG
rm -f unity-debug.zip
zip -r9 unity-debug.zip bin/ attach.js package.json Changelog.txt -x "*.DS_Store"
zip -r9 unity-debug.zip bin/ attach.ts package.json Changelog.txt -x "*.DS_Store"

vsix: clean $UNITY_DEBUG
rm -f *.vsix
Expand Down
2 changes: 1 addition & 1 deletion MonoDebug
Submodule MonoDebug updated 1 files
+11 −6 src/DebugSession.cs
7 changes: 7 additions & 0 deletions UnityDebug/Program.cs
Expand Up @@ -4,6 +4,7 @@
using System.Reflection;
using Mono.Debugging.Client;
using MonoDevelop.Debugger.Soft.Unity;
using MonoDevelop.Debugger.VsCodeDebugProtocol;
using VSCodeDebug;

namespace UnityDebug
Expand Down Expand Up @@ -81,6 +82,12 @@ static void RunSession(Stream inputStream, Stream outputStream)
debugSession.Start(inputStream, outputStream).Wait();
}

static void RunVSSession(Stream inputStream, Stream outputStream)
{
VSCodeDebuggerSession debugSession = new VSCodeDebuggerSession();
debugSession.Start(inputStream, outputStream);
}

static string GetUnityProcesses()
{
var processes = UnityProcessDiscovery.GetAttachableProcesses();
Expand Down
12 changes: 11 additions & 1 deletion UnityDebug/UnityDebug.csproj
Expand Up @@ -57,6 +57,9 @@
<Reference Include="ICSharpCode.NRefactory.CSharp, Version=5.0.0.0, Culture=neutral, PublicKeyToken=d4bfe873e7598c49">
<HintPath>..\External\ICSharpCode.NRefactory.CSharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shared.VSCodeDebugProtocol, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\External\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Shared.VSCodeDebugProtocol, Version=15.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\packages\Microsoft.VisualStudio.Shared.VsCodeDebugProtocol.15.6.20118.1\lib\net45\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -118,10 +121,13 @@
<Reference Include="MonoDevelop.Debugger.Soft, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3ead7498f347467b">
<HintPath>..\External\MonoDevelop.Debugger.Soft.dll</HintPath>
</Reference>
<Reference Include="MonoDevelop.Debugger.VsCodeDebugProtocol, Version=0.0.0.0, Culture=neutral, PublicKeyToken=3ead7498f347467b">
<HintPath>..\External\MonoDevelop.Debugger.VsCodeDebugProtocol.dll</HintPath>
</Reference>
<Reference Include="MonoDevelop.Unity, Version=1.4.0.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\External\MonoDevelop.Unity.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\External\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
Expand Down Expand Up @@ -189,6 +195,10 @@
</Compile>
<Compile Include="Platform.cs" />
<Compile Include="Util.cs" />
<Compile Include="VSCodeDebugger\VsCodeBacktrace.cs" />
<Compile Include="VSCodeDebugger\VSCodeDebuggerSession.cs" />
<Compile Include="VSCodeDebugger\VsCodeObjectSource.cs" />
<Compile Include="VSCodeDebugger\VsCodeStackFrame.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
Expand Down

0 comments on commit b48e046

Please sign in to comment.