How to properly debug my code?
Followed by 2 people
Hello,
I am pretty happy with Rider, but so far my debugging experience has been horrible.
In Visual, upon an exception, the IDE will halt the program and stop at the exact line in my code where the exception occurred. I can then examine what is wrong with my code easily.
In Rider, upon an exception, the IDE will halt, but just show the rider frontend. Then, I have to manually open/switch to the Debug window. In it, Rider displays the call stack, but more often then not, it only contains obscure (to me) calls deep in WPF/.NET with little indication of what actually went wrong. I then have to manually open the exception and inspect its stack trace, which does have info about where in my code things actually went wrong.
I tried g00gling this and tried a myriad of different settings, to no avail.
What am I doing wrong? I must admit I am rather lazy when it comes to getting to know the intricacies of software I use (my loss!), but I would expect this kind of essential operation to "just work"...!
Any help is appreciated. Until then, I'll switch to Visual for my debugging!
Greets, Menno
Please sign in to leave a comment.
Hello ,
I guess that your problem is caused by this known issue in Rider.
What might help is turning off
Enable external source debug
option inFile | Settings | Build, Execution, Deployment | Debugger
. Please let me know if it works.Hello Julia,
thanks for your swift response! Unfortunately, that option is already off. As mentioned, I tried a myriad of options and combination of options before posting here.
The issue you referenced is related to async code, which indeed is the issue here. I am developing a WPF application where a lot of things happen async as data is retrieved from the database, and/or calculations are done before displaying results to the end user. If an exception occurs in async code, the only way for me to find out what is actually causing this, is manually looking inside the exception that rider displays. Then, I have to manually go and find the actual line of code where things went wrong. This as opposed to Visual, which just halts at the expected position and displays the exception in a nice popup window.
Would be nice to have this fixed soon, I would except this to have major impact on the debugging experience of lots of people, given the increasingly commonplace usage of async programming...
I kept up debugging with Rider for fairly long using the awkward manual methods described, but now I will just stick with Visual for debugging.
Other than this, I really enjoy using Rider.
Greets! Menno
Menno,
Thank you for sharing your experience with me, I have passed it to Rider devs team. We will do our best to fix this bug in near future.