none
Visual Studio Community 2017 restarting when using breakpoints RRS feed

  • Question

  • I've been getting an error every time I try to add breakpoints to my code in VS2017: "An exception has been encountered. This may be caused by an extension."

    I've tried disabling all extensions, updating all of them and even uninstalling and reinstalling Visual Studio. But the error continues. 

    I can still use VS to code and debbuging works sometimes, even if I can't see the breakpoints and get the error message every time I open a file that has breakpoints. Biggest problem is that sometimes instead of the error message, the program restarts, it's really bothersome and makes debugging anything much harder.

    This is the the error I'm getting on ActivityLog.xml:

    "System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) at System.Windows.Media.Imaging.WriteableBitmap.InitFromBitmapSource(BitmapSource source) at System.Windows.Media.Imaging.WriteableBitmap..ctor(BitmapSource source) at Microsoft.VisualStudio.Editor.Implementation.TextMarkerGlyphFactory.CreateGlyphBrushForMarkerType(Int32 markerType, Int32 desiredSize) at Microsoft.VisualStudio.Editor.Implementation.TextMarkerGlyphFactory.GenerateGlyph(IWpfTextViewLine line, IGlyphTag tag) at Microsoft.VisualStudio.Text.Editor.Implementation.CanvasAndGlyphFactory`1.GenerateGlyph(IWpfTextViewLine line, ITag tag) at Microsoft.VisualStudio.Text.Editor.Implementation.GlyphMarginVisualManager`1.AddGlyph(TGlyphTag tag, SnapshotSpan span) at Microsoft.VisualStudio.Text.Editor.Implementation.GlyphMargin`1.RefreshGlyphsOver(ITextViewLine textViewLine) at Microsoft.VisualStudio.Text.Editor.Implementation.GlyphMargin`1.OnBatchedTagsChanged(Object sender, BatchedTagsChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)"

    Thanks

    Wednesday, May 8, 2019 7:20 PM

All replies

  • Hi TubaZef,

    Welcome to MSDN forum.

    According to your description, please follow the below steps to help me to find the possibility which cause this issue:

    ##Check the Visual Studio debugger for problems

    >1 please create an new project, which is like a "hello world", then add a breakpoint, and check if visual studio works normally.

    >2 Press win+R>>type "Devenv.exe /SafeMode" to open visual studio as safe mode, then try the above step. Safe mode is to prevents all third-party VSPackages from loading when Visual Studio starts, allowing stable execution.

    >3 please try to debug this project in other machines.

    ##Check if the project causes this issue

    >4 According to the log, it seems that the project lack some dll file in your project. Please add a reference to the library in the main project. Refer the similar issue.

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, May 9, 2019 2:52 AM
  • Thanks for the reply.

    Getting the same problem with other projects, Safe Mode also didn't help.

    I've also tried uninstalling and reinstalling Visual Studio and .Net Frameworks again but it doesn't seem to change.

    Thursday, May 9, 2019 4:17 PM
  • Hi TubaZef,

    Sorry for delay in reply.

    Please clean visual studio caches in 

    C:\Users\[User Name]\AppData\Local\Microsoft\VisualStudio
    C:\Users\[User Name]\AppData\Local\Microsoft\VSCommon
    C:\Users\[User Name]\AppData\Local\Microsoft\TeamFoundation

    Then try to open visual studio to re-debug the project.

    If there is any update information, please feel to contact me.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com


    Thursday, May 16, 2019 8:43 AM