0

Is there anyway to stop during debugging NServiceBus from pausing on every internal exception thrown?

I do not want to disable break on all exceptions as I need to catch exception in my code.

I also don't want to configure to not break on System.Net.WebException and System.Exception as we use web technologies and like to know when they have propergated in our code.

I guess I don't really understand why this seems only to be the case for NServiceBus and no other nuget plugin I use. Is it because we use the NServiceBus.Host.exe program?

Simlar questions

NServiceBus throws The remote server returned an error: (404) Not Found

WebException error 404 after upgrading NServiceBus to version 3.3.8

How to disable RavenDB replication

Exception breaks during start of debug Currently starting a project break 12 times, some dissapear during the day.

  1. 'System.Net.WebException' The remote server returned an error: (404) Not Found. (RavenDb stack trace)
  2. The remote server returned an error: (404) Not Found. (Again)
  3. The remote server returned an error: (404) Not Found. (Again)
  4. The remote server returned an error: (404) Not Found. (Again)
  5. The remote server returned an error: (404) Not Found. (Again)
  6. The remote server returned an error: (404) Not Found. (Again)
  7. The remote server returned an error: (500) Internal Server (RavenDb stack trace)
  8. System.InvalidOperationException Url: "/docs/Raven/Authorization/WindowsSettings" (RavenDb stack trace)
  9. 'System.InvalidOperationException Url: "/docs/Raven/Authorization/WindowsSettings" (Again)
  10. 'System.InvalidOperationException Url: "/docs/Raven/Authorization/WindowsSettings" (Again)
  11. Exception has been thrown by the target of an invocation. (RavenUserInstaller)
  12. System.Exception: RavenDB requires a Commercial license to configure. (RavenUserInstaller)

Notes

  • We run RavenDb on port 8081
  • We have a valid NServiceBus license, and run version 4.6.1
  • We do not install a commercial license on the dev machines for RavenDb
Community
  • 1
  • 1
Choco Smith
  • 1,658
  • 18
  • 24

2 Answers2

3

In Visual Studio, try Tools > Options > Debugging > General, then look for Enable Just My Code and make sure that is checked.

Failing that, check the settings in the Exceptions dialog (Debug > Exceptions or Ctrl+Alt+E) but note that this option only appears when you have a project loaded.

David Boike
  • 18,545
  • 7
  • 59
  • 94
  • Thanks for the answer but unfortunately this is already checked. What I don't get is why only for NServiceBus? We have a lot of other plugins/nuget packages installled that don't break. We have three totally different solution running NServiceBus and all break upon startup for these or similar errors. – Choco Smith Jul 18 '14 at 08:10
  • Thought that would do the trick, but I added another place to check to my answer. – David Boike Jul 18 '14 at 12:55
  • Thanks but still no luck, i have the check box ticked for thrown and user unhandled. I was hoping to avoid unchecking "thrown" for certain exceptions. I just tried to move a NServiceBus project running as a startable bus to the NServiceBusHost and Endpoint and I still get the exception propergating in my code :| – Choco Smith Jul 18 '14 at 14:13
0

Unfortunately there is no way for NServiceBus to skip these exception.
These exceptions are thrown and handled by Raven internally.
The only way is for you to chance persistence to use NHibernate instead.

BTW, this question has been previously asked, see https://stackoverflow.com/a/5880940/90882

Community
  • 1
  • 1
John Simons
  • 4,288
  • 23
  • 41