Skipping the code while debugging

Ranorex Spy, Recorder, and Studio.
Saha
Posts: 39
Joined: Tue Mar 01, 2011 6:20 pm

Skipping the code while debugging

Post by Saha » Tue Aug 23, 2011 4:25 pm

Hi,

Is there any way to skip certain block of code while debugging? I was commenting the code in the past but now my script is too big and it is difficult to comment and debug only certain block.

Please let me know.
Thanks,
Saha

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Skipping the code while debugging

Post by Ciege » Tue Aug 23, 2011 6:09 pm

Is all of your code in one big method?

I would suggest structuring your code in several, smaller, function specific methods that each get called successively by a parent method. When structured in such a way, all you need to do is comment out the method(s) call within the parent method instead of needing to select large amounts of code to comment out.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Skipping the code while debugging

Post by Support Team » Tue Aug 23, 2011 7:44 pm

Although I prefer the method Ciege suggested, you can also use the "Set Current Statement" context menu item while debugging to select the next line to execute. Just right click on the line you want to execute and select the mentioned menu item; see following screenshot:
Debug_SetCurrentStatement.png
Debug_SetCurrentStatement.png (20.49 KiB) Viewed 753 times
Regards,
Alex
Ranorex Team
.
Image