Breakpoints not being hit in JetBrains Rider?

12,758

Solution 1

I've found what was causing it.

As of Rider 2018.1.3, the solution you're running must be on the same disk as the copy of Rider you're using.

This issue is referenced on JetBrains support here.

You can temporarily solve this by either moving your solution to the same drive, or by reinstalling Rider.

Solution 2

One more caveat: I started using Rider again after an absence, I was pressing the "play" (triangle) button rather than the button with a picture of a bug.

(D'oh!)

Solution 3

What I did before was :

  1. Open the solution
  2. Set some breakpoints
  3. Click the 'bug' button in Rider (next to the play button)
  4. Chrome would open up automatically with an URL pointing to my services
  5. The service would work as expected, but breakpoints would not work
  6. Stop the service
  7. Modify some code
  8. Start the service
  9. Refresh the Chrome Windows from step 4
  10. I would see the modifications in Chrome. But no breakpoints would get hit.

Now the only thing I changed is that in after step 2 I now do a

Run --> Attach to a local process... --> w3wp

After this, I just do the same steps as before, but now the breakpoints do get hit...

Refrence

Solution 4

In relation to Jessica's answer above, it appears that opening a solution in Rider using the System absolute path (i.e. /System/Volumes/Data/Users/...) appears to act as though it's on a separate drive.

After driving myself crazy for about four hours, I created a new solution and changed the solution directory from the system path to /Users/... then copied my project to this new solution which fixed the breakpoints, and opening the project from the Rider welcome screen now shows the solution directory as a relative path (~/Users/...)

Solution 5

Cleaning and rebuilding the solution, and then removing and readding the breakpoint worked for me!

Share:
12,758
Jessica
Author by

Jessica

.NET Developer. 23.

Updated on June 05, 2022

Comments

  • Jessica
    Jessica almost 2 years

    I am trying to set a breakpoint in JetBrains Rider, but the debugger isn't breaking.

    I know for sure the application should reach the code I'm trying to break on, as changing string literals appears in the program.

    I have completely reinstalled all my JetBrains programs (wiping settings). I've also tried every answer in this thread: break point is not hitting while debugging, with no luck.

    This bug doesn't occur in Visual Studio, but does occur with any project in Rider.

    It also doesn't happen on my other copy of Rider that I use on my other PC.

    I appreciate any help, thanks!

  • janw
    janw almost 4 years
    Also a note for those who switched from VS like me: The F5 key does not start debugging, it just runs the code; even when using the VS keymaps.
  • Alex
    Alex almost 3 years
    This was my issue too but debugging worked in VS2019 - In Rider, when hovering over the disabled breakpoint, you will see a message like module not found in D:\Folder\Code\Script.cs. Move the project to the same drive as rider, clean the solution, restart windows, run from Rider successfully hit breakpoint. Also make sure your Unity project build settings have "Development mode" and "Script debugging" enabled.
  • Allen
    Allen over 2 years
    Ummm where the heck is this setting to be found?
  • chrjs
    chrjs over 2 years
    It can be set via an Enviroment Variable. appsettings.json, launchsettings...
  • user955485
    user955485 almost 2 years
    I was doing the same thing. Thanks