0

Since this morning, I can't debug my console application anymore in Visual Studio. I've clean the solution, even delete the entire Debug folder but when I try to run in Debug, a new tab opens with the following message:

Source Not Available

Source information is missing from the debug information for this module.
You can view disassembly in the Disassembly window. To always view disassembly for missing source files, change the setting in the Option dialog.

There is also a pop up window saying:

Unhandled exception at 0x766FC69B (shell32.dll) in sfi.exe: 0xC0000005: Access violation reading location 0x00000004. occurred

My attempts so far

Following some comments, in the Exception Settings, I've unticked EVERY single exceptions, it didn't resolve anything.
I tried clicking on Continue but give up after the 30 consecutive F5 clicks.
Close VS 2017, log out, reboot, the bug is still there.

Anyone know how to get the Debug mode back in Visual Studio?

Hydraxize
  • 161
  • 10
  • What is `sfi.exe`? – stuartd Jul 25 '22 at 14:39
  • Are you sure that you are using debug configuration? did you change anything on project settings? – Marco Beninca Jul 25 '22 at 14:42
  • @stuartd that's the application I'm trying to debug – Hydraxize Jul 25 '22 at 14:46
  • @MarcoBeninca I haven't changed anything in the project, since this bug occurred, I've tried to tick/untick some options in the Debugging panel but there are so many I haven't tested all of them yet. – Hydraxize Jul 25 '22 at 14:50
  • You'll never have the source available for shell32.dll, unless you work for Microsoft. That is not where the bug is located. Use Debug > Windows > Call Stack to find out how it got there. – Hans Passant Jul 25 '22 at 15:01
  • @HansPassant I'm not sure this is particularly useful: > shell32.dll!CShellFolderViewOC::GetConnMap(int *) shell32.dll!`dynamic initializer for 'ATL::IConnectionPointContainerImpl::pConnMap''() ucrtbase.dll!__initterm() shell32.dll!dllmain_crt_process_attach() shell32.dll!dllmain_crt_dispatch() shell32.dll!dllmain_dispatch() shell32.dll!__DllMainCRTStartup@120() ntdll.dll!_LdrxCallInitRoutine@160() ntdll.dll!LdrpCallInitRoutine() ntdll.dll!LdrpInitializeNode() ntdll.dll!LdrpInitializeGraphRecurse() ntdll.dll!LdrpInitializeGraphRecurse() – Hydraxize Jul 25 '22 at 15:18
  • ntdll.dll!LdrpPrepareModuleForExecution() ntdll.dll!LdrpLoadDllInternal() ntdll.dll!LdrLoadDll() ntdll.dll!_KiUserApcDispatcher@160() ntdll.dll!LdrInitializeThunk() – Hydraxize Jul 25 '22 at 15:18
  • try to manually delete both bin and obj folders – Marco Beninca Jul 25 '22 at 15:28
  • @MarcoBeninca I've deleted the two folders and still have the same issue. What I can't understand is why does it break at this exception when all the boxes are unticked in the Exceptions Setting. Also the exception handlers says "Access violation reading location", how can I know what the program is trying to read? – Hydraxize Jul 25 '22 at 15:37
  • Perhaps "Just my code" is not enabled? https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2017/debugger/just-my-code?view=vs-2017 – W. Winnie Jul 25 '22 at 18:14
  • @W.Winnie I'm afraid JmC is enabled (I sincerely hope I had inadvertently turned it off but no). – Hydraxize Jul 25 '22 at 21:06
  • This look like a similar problem(https://stackoverflow.com/questions/45574986/vs2017-source-not-available ). Does the solution can help you? – Jingmiao Xu-MSFT Jul 26 '22 at 02:53
  • Are you able to debug other projects? is this the only one with this issue? If it is general problem maybe uninstall and reinstall VS could help – Marco Beninca Jul 26 '22 at 06:30
  • @JingmiaoXu-MSFT Untick the "Microsoft Symbols Server" kind of make things worse as it couldn't load any pdb file for a while. Now I'm back to the original Source Not Available. I have a Professional subscription with Microsoft but they refuse to assist and asking for an additional premium service for anything related to the debugger. – Hydraxize Jul 26 '22 at 16:28
  • @MarcoBeninca No, still stuck on this issue, I can't make any progress, the program can compile but it is impossible to debug anything. I'll either start a new project and copy/paste all the files or as you suggest reinstall VS (I'm trying to figure what is the least worst option between the two). – Hydraxize Jul 26 '22 at 16:29

0 Answers0