Visual studio hanging during debug

Ask general questions here.
chrisgeorge
Posts: 49
Joined: Thu Aug 20, 2009 11:28 am

Visual studio hanging during debug

Post by chrisgeorge » Tue Sep 01, 2009 1:19 pm

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
Chris George
Test Engineer

Red Gate Software Ltd
Cambridge

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Visual studio hanging during debug

Post by Support Team » Tue Sep 01, 2009 1:25 pm

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

chrisgeorge
Posts: 49
Joined: Thu Aug 20, 2009 11:28 am

Re: Visual studio hanging during debug

Post by chrisgeorge » Tue Sep 01, 2009 2:37 pm

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.
Chris George
Test Engineer

Red Gate Software Ltd
Cambridge

cancerion
Posts: 30
Joined: Tue Jun 16, 2009 6:15 pm

Re: Visual studio hanging during debug

Post by cancerion » Wed Sep 02, 2009 5:31 am

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Visual studio hanging during debug

Post by Support Team » Wed Sep 02, 2009 3:03 pm

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

chrisgeorge
Posts: 49
Joined: Thu Aug 20, 2009 11:28 am

Re: Visual studio hanging during debug

Post by chrisgeorge » Wed Sep 02, 2009 10:10 pm

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
Chris George
Test Engineer

Red Gate Software Ltd
Cambridge

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Visual studio hanging during debug

Post by Support Team » Thu Sep 17, 2009 2:12 pm

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