0

I'm currently building an application which has become quite big. Even though the application is working fine, I am seeing in the "Output"-window a few Exceptions being thrown. I would like to solve those exceptions but the Exceptions don't provide any information from which method they are coming. So for example I get a System.ObjectDisposedException, but I don't really have an idea where it is being thrown.

Is there a way I can easily trace where this Exception is being thrown?

Thanks

Cainnech
  • 439
  • 1
  • 5
  • 17
  • Do those happen to be first-chance exceptions? [What is a “first chance exception”?](https://stackoverflow.com/questions/564681/what-is-a-first-chance-exception) – Andrew Morton Mar 15 '20 at 15:36
  • Maybe helpful [How to break on handled exceptions](https://stackoverflow.com/a/47681894/12417300) – Rans Mar 15 '20 at 15:38
  • Set as much debugging points as possible and try to find the method where it throws the exception. – Max Mar 15 '20 at 15:38
  • I'm guessing it could be a first chance exception but I don't know for sure. Also setting as many debugging points as possible makes it almost impossible to debug... – Cainnech Mar 15 '20 at 15:44
  • The exception means that you try to use an object after it was Dispose()d. Possibly in a "using" statement. So look for that – Hans Kesting Mar 16 '20 at 06:25

1 Answers1

0

I just noticed that in the Debugger under Exception Settings I can enable Exceptions to break on. So this way I can find where they are being thrown.

Cainnech
  • 439
  • 1
  • 5
  • 17