Page 1 of 1

Visual studio hanging during debug

Posted: Tue Sep 01, 2009 1:19 pm
by chrisgeorge
Is anyone else having problems with visual studio (2005) hanging when debugging ranorex code?

It doesn't happen every time, but enough to be getting annoying. I can't pin it down to a specific operation, it seems more general than that.


Chris

Re: Visual studio hanging during debug

Posted: Tue Sep 01, 2009 1:25 pm
by Support Team
I assume that this "hanging" is caused by setting the Keyboard.AbortKey. If you do not set an abort key, there should not be a delay. Hence comment out the following line:
// Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
Another cause could be that in your code you subscribed to the Mouse or Keyboard events. That could also cause a hang while debugging.

Regards,
Alex
Ranorex Support Team

Re: Visual studio hanging during debug

Posted: Tue Sep 01, 2009 2:37 pm
by chrisgeorge
I don't set the Abort key anywhere (didn't actually know about it). Most of the "hangs" occurs when not doing mouse or keyboard operations... usually getting properties from objects. When it happens i have to kill VS.

Re: Visual studio hanging during debug

Posted: Wed Sep 02, 2009 5:31 am
by cancerion
I have also seen same problem. It happens during debugging only sometimes.
Even I have not set Keyboard.AbortKey anywhere and it is also not specific to Mouse or Keyboard events.

Re: Visual studio hanging during debug

Posted: Wed Sep 02, 2009 3:03 pm
by Support Team
Actually, I meant mouse and keyboard events, not actions/operations. That means, hangs could occur if you subscribe to any of the Mouse or Keyboard events, like Mouse.Move or Keyboard.KeyUp.

Could you tell me some more information when those hangs occur? You said they usually happen when you "get properties from objects" - do you mean when you do that in the "watch window" of VS?
Do the hangs occur when you step through the code or when you run the code in the debugger (without a breakpoint)?

Regards,
Alex
Ranorex Support Team

Re: Visual studio hanging during debug

Posted: Wed Sep 02, 2009 10:10 pm
by chrisgeorge
It hangs when stepping through code, usually stepping over a ranorex statement, maybe something like getting the children of an object, or a property of an object.

Unfortunately is does not happen in the same place every time so I can't even provide an example.

The next time I experience the problem I'll make a note of the statement that caused it.


Chris

Re: Visual studio hanging during debug

Posted: Thu Sep 17, 2009 2:12 pm
by Support Team
Just to let everyone else know:
Chris found out that the Visual Studio 2008 hanging problem seems to be a problem with ReSharper 4.5. If ReSharper is enabled, stepping through Ranorex code may bring Visual Studio to hang.

A solution could be to disable ReSharper during debugging, but I don't know if that's possible.

Regards,
Alex
Ranorex Support Team