3 Replies - 297 Views - Last Post: 15 August 2011 - 10:09 AM Rate Topic: -----

#1 bob12321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 19-July 11

Record all the lines of code being run...

Posted 15 August 2011 - 09:58 AM

I have a form that on load keeps closing without any errors... I have no clue what it wrong with it

How can I record all the lines of code being executed so that I can find out why it is closing

There are no errors or me.closes

Thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: Record all the lines of code being run...

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,134
  • Joined: 12-June 08

Re: Record all the lines of code being run...

Posted 15 August 2011 - 10:01 AM

Put a breakpoint at the start of your constructor or load event and start debugging each line as they are being executed.

Debugging
Was This Post Helpful? 0
  • +
  • -

#3 bob12321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 19-July 11

Re: Record all the lines of code being run...

Posted 15 August 2011 - 10:02 AM

No because there are multiple areas which are started up:

Form.load

Timer1.tick etc...

That would not work!
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9088
  • View blog
  • Posts: 34,134
  • Joined: 12-June 08

Re: Record all the lines of code being run...

Posted 15 August 2011 - 10:09 AM

Is this a multi-threaded application? If it's .NET then the application generally operates in a sequential order - and scattering breakpoints would capture and slow down critical areas you think might be causing the form to close down. Yes, it will work.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1