question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using SentrySdk.WithScope with SentrySdk.CaptureException causes Rider to not be able to evaulate IEnumerable statements

See original GitHub issue

Environment

Windows 10 x64 dotnet core 3.1

How do you use Sentry? Sentry SaaS (sentry.io)

Which SDK and version? dotnet core 3.1 .NET Sentry 3.9.4

Steps to Reproduce

Sample Project: https://github.com/jasekiw/example-rider-evaluation-issue

  1. Put a breakpoint on the first line of the Main method and debug the program until it hits that line.
  2. Evaluate the following in the Evaluation window in the Jetbrains Rider IDE
(new List<string>{"", ""}).Where(e => e != null).ToList()
  1. Hit Enter

Expected Result

Get a a list result

Actual Result

Null Reference Exception

Extra information

I created a ticket with Rider as well that has more information and screenshots about this issue: https://youtrack.jetbrains.com/issue/RIDER-68524

I created this issue here in order to open communications since this is a cross company issue.

I have not ever experienced this with any other lines of code/software.

Note: The code doesn’t have to execute, it just has to exist.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jasekiwcommented, Oct 1, 2021

Yes that is correct.

here is a screenshot from the jetbrains ticket for additional context: image

0reactions
jasekiwcommented, Oct 6, 2021

Wow. I apologize for pulling you guys into this. Honestly JetBrains probably wouldn’t have gotten back to me for a long time so thank you for tracking this down! It does seem to be a bug with rider as I would still think that would be valid as long as I don’t step the debugger into the catch statement.

Thanks again for your all’s help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scope passed on `captureException` is not consistent on ...
I have tried all the different ways to pass the scope in the capture exception but none seems to work. Any help?
Read more >
CaptureException not showing up in sentry (C#)
I am testing by having an error in my code, and can debug through my web app to see that the SentrySdk.CaptureException() method...
Read more >
SentrySDK not sending/Backend not receving event #506
I don't understand what this means. Sentry's SDK doesn't have any connection to that endpoint. To further troubleshoot initialize the SDK in ......
Read more >
Usage for .NET | Sentry Documentation
Usage. Sentry's SDK hooks into your runtime environment and automatically reports errors, uncaught exceptions, and unhandled rejections as well as other types ...
Read more >
Sentry SDK with Asp.Net 4.6.1 Not working
I have an Asp.Net app, using .net 4.6.1 version. When I installed Sentry nuget and used Sentry SDK, nothing working, no events are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found