You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short, Unity debug adapter does not comply with DAP specification.
I use nvim to work with Unity projects and visualstudiotoolsforunity.vstuc as DAP. It works fine at first. Debug adapter attaches to Unity without any errors. However, if I set a breakpoint somewhere, my debug session crashes with NullReferenceException:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.Unity.ExceptionManager.ProcessRequest(SetExceptionBreakpointsArguments arguments)
at Microsoft.VisualStudio.Unity.AD7DebugAdapter.HandleSetExceptionBreakpointsRequest(SetExceptionBreakpointsArguments arguments)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.DebugAdapterBase.HandleProtocolRequest(String requestType, Object requestArgs)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.DebugAdapterBase.OnProtocolRequestReceived(Object sender, RequestReceivedEventArgs e)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol.OnRequestReceived(String command, IRequestResponder responder)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.DebugAdapterBase.HandleSetExceptionBreakpointsRequestAsync(IRequestResponder`1 responder)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.DebugAdapterBase.HandleSetExceptionBreakpointsRequestAsync(IRequestResponder`2 responder)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.DebugAdapterBase.<InitializeProtocolClient>b__5_37(IRequestResponder`2 r)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.RequestWithResponseInfo`2.InvokeHandler(DebugProtocol protocol, ProtocolRequest request, Object args)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol.HandleIncomingRequest(String msg)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol.HandleIncomingMessage(String msg)
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol.ProcessMessageBody()
at Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol.ReaderThreadProc()
jbevain
changed the title
[BUG] breakpoints in visualstudiotoolsforunity.vstuc are broken
[BUG] Exception when creating breakpoints with NVIM and the Unity debugger
Jan 6, 2025
Describe the Issue
In short, Unity debug adapter does not comply with DAP specification.
I use nvim to work with Unity projects and visualstudiotoolsforunity.vstuc as DAP. It works fine at first. Debug adapter attaches to Unity without any errors. However, if I set a breakpoint somewhere, my debug session crashes with NullReferenceException:
As it turns out, the exception occurs due to the lack of
filterOptions
inSetExceptionBreakpointsRequest
. But according to the specification,filterOptions
are considered optional (https://microsoft.github.io/debug-adapter-protocol/specification.html#Requests_SetExceptionBreakpoints).Looks like an issue.
Environment Information
nvim 0.10.2
visualstudiotoolsforunity.vstuc 1.0.5
Unity 2022.3.54 + Visual Studio Editor package 2.0.22
vstuc log: vstuc.log
nvim dap config: unity.lua
The text was updated successfully, but these errors were encountered: