Announcement

Collapse
No announcement yet.

Unable to debug/hitting-breakpoint in Visual Studio 2019

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Unable to debug/hitting-breakpoint in Visual Studio 2019

    I'm not sure what I'm missing here but I tried the following steps for a brand new project but it still didn't work. I'm using Visual Studio Community 2019 version 16.5.5

    1. Create a new Game project with C++.
    2. Create a new C++ actor class
    Click image for larger version  Name:	epic2_0.PNG Views:	1 Size:	24.4 KB ID:	1764536
    3. Set breakspoint.
    4. Change config to DebugGame_Editor.

    Click image for larger version  Name:	epic2.PNG Views:	1 Size:	135.8 KB ID:	1764537
    5. Build and hit F5

    All of my breakpoints arent getting hit as seen above.

    Other configs:

    Click image for larger version  Name:	epic3.PNG Views:	1 Size:	33.3 KB ID:	1764538

    Click image for larger version  Name:	epic4.PNG Views:	1 Size:	38.0 KB ID:	1764539

    Click image for larger version  Name:	epic1.PNG Views:	1 Size:	47.9 KB ID:	1764540
    Last edited by VictorK009; 05-21-2020, 02:57 AM.

    #2
    So yeah, I have encountered this numerous times in my time with UE4 (though it has gotten better). I am not 100% sure of the cause but I sort of blame hot reload on this. Essentually the DLLs are not reloading properly and/or something has locked them and is using them (Like a hanging instance of your editor).

    First, check your task manager for any instance of the Unreal Edtior running in the background. Kill it and that should do it.

    Second, if that doesn't work try to perform a full Rebuild and hopefully that fixes it.

    Third, Nuclear option. Delete ALL intermediate folders and binary folders from your project, this includes plugins you may have in your project's directory. Regenerate your Visual Studio project files. And build it again. That has always worked for me, but it may also take the longest time.
    Professional Game Developer
    Asadeus Studios

    Marketplace Content:
    Pro Mounting System

    Comment


      #3
      Originally posted by ArcainOne View Post
      So yeah, I have encountered this numerous times in my time with UE4 (though it has gotten better). I am not 100% sure of the cause but I sort of blame hot reload on this. Essentually the DLLs are not reloading properly and/or something has locked them and is using them (Like a hanging instance of your editor).

      First, check your task manager for any instance of the Unreal Edtior running in the background. Kill it and that should do it.

      Second, if that doesn't work try to perform a full Rebuild and hopefully that fixes it.

      Third, Nuclear option. Delete ALL intermediate folders and binary folders from your project, this includes plugins you may have in your project's directory. Regenerate your Visual Studio project files. And build it again. That has always worked for me, but it may also take the longest time.
      Thanks for your reply. I dig a lil deeper and it turns out the symbol file (.pdb) for my debug assembly was never loaded properly. I followed the answer in this link (https://stackoverflow.com/questions/...active#tab-top) to confirm and then load the symbol manually (Debug > Window > Modules and filter the assembly). After that I was able to hit my breakpoint.

      Click image for larger version

Name:	solved2.PNG
Views:	79
Size:	14.3 KB
ID:	1765001

      Click image for larger version

Name:	solved1.PNG
Views:	54
Size:	91.9 KB
ID:	1765002

      Comment


        #4
        Hey there, I'm having the same issue, but the above advice didn't help.

        I recently decided to try out ReSharper to see if it'd enhance my speed in writing some of the C++ code. When I installed it I initially got a lot of errors and the purported fix was to right click the UE4 project file and regenerate the VS solution files.

        After having done this, none of the breakpoints work. As far as I can tell all of the symbols are loaded (looked under the modules section) but my breakpoints are never getting hit. How can I fix this, or if anyone knows, how can I find where the symbols for my project are stored, so I can prove they're not being loaded and figure out a fix?

        I'm using VS 2019 and the latest version of UE.

        Comment


          #5
          I managed to solve this. I had a look at the solution settings and the debug symbols path was pointing at the wrong place

          Comment

          Working...
          X