Jump to content

Pause Execution

- - - - -

  • Please log in to reply
2 replies to this topic

#1
UIL

UIL

    Newbie

  • Members
  • Pip
  • 1 posts
Is there a way to pause code execution only in the constructor/method without putting the thread to sleep? Using a while loop seems ineffective. This is for a multiplayer game.

#2
Tonchi

Tonchi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 471 posts
  • Location:Varaždin
  • Programming Language:C, C++, C#
if you want to do it during design mode you should do it with breakpoints

#3
sam_coder

sam_coder

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 372 posts
youd have to key it somehow. You could cause a break programatically I believe, but that isnt what you're looking for.

You can also cause a break when an exception is thrown, as opposed to when it's unhandled (this can be selected in the Exceptions dialog, found in the debug menu), and is a VERY useful tool! I recommend you check it out.

I don't know of any way to break the code when a constructor is hit though.

There may be an attribute you can add to constructors causing it to break as well, but I don't see how this would be any more advantageous than just setting up breakpoints.

I think if you were to set it up to break on constructors, youd just go nuts anyways. =)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users