Hi,
I'm suddenly getting an error when trying to remote debug a protocol when clicking "Attach" in the DIS Inject window:
In the window for the remote debugger I can see that the connection is being made:
Debugging an automation script works fine.
When trying to attach to SLScripting.exe trough Visual Studio I get a similar error:
Stack trace:
2024/03/22 04:07:56.869|Process: C:\Skyline DataMiner\Files\SLScripting.exe [15340]
2024/03/22 04:07:56.891|Attaching to process C:\Skyline DataMiner\Files\SLScripting.exe (ID: 15340)...
2024/03/22 04:07:57.314|Could not attach to SLScripting process.
System.Runtime.InteropServices.COMException (0x8971001E): Exception from HRESULT: 0x8971001E
at EnvDTE80.Process2.Attach2(Object Engines)
at Skyline.VSX.ProtocolEditor.Toolwindows.ViewModel.InjectDllManager`2.AttachToProcesses(String processName, Dictionary`2 processesToAttach, Engine engine)
2024/03/22 04:07:57.322|OnAttach_Executed|System.Exception: Could not attach to SLScripting process (another debugger is already attached): Exception from HRESULT: 0x8971001E ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x8971001E
at EnvDTE80.Process2.Attach2(Object Engines)
at Skyline.VSX.ProtocolEditor.Toolwindows.ViewModel.InjectDllManager`2.AttachToProcesses(String processName, Dictionary`2 processesToAttach, Engine engine)
--- End of inner exception stack trace ---
at Skyline.VSX.ProtocolEditor.Toolwindows.ViewModel.InjectDllManager`2.AttachToProcesses(String processName, Dictionary`2 processesToAttach, Engine engine)
at Skyline.VSX.ProtocolEditor.Toolwindows.ViewModel.InjectDllManager`2.AttachToProcess(String processName)
at Skyline.VSX.ProtocolEditor.Toolwindows.ViewModel.InjectDllManager`2.OnAttach_Executed(Object sender, ExecutedRoutedEventArgs e)
Hi Robin,
Only one debugger can be connected to a process at the same time. The error message indicates that another debugger is already connected to the SLScripting process. Maybe check if there is no other remote debugger application active on that machine. That can also be under another (RDP) user. The easiest way to verify this is to open process manager on the machine that you want to debug and check if there are not other instances of 'msvsmon.exe' active.
Hi Robin, something else must be attached to the process then. Have you installed “Debug Diagnostic Tool” on that server? (https://stackoverflow.com/a/24606264/638244)
Turns out we were running procdump on the SLScripting process in another troubleshooting case and this was blocking the debugger.
That explains it indeed. Procdump will indeed also interfere with the debugger.
Hi Tom. There is no other remote debugger connected.