Page 1 of 1

How to change content of string variable during debugging

Posted: Wed Dec 21, 2016 10:28 am
by odklizec
Hi,

As many of you probably know, it's possible to change the content of int variables during debugging (via Watch window). However, I only recently found out it's possible to change the String variable as well, just not via Watch window! String variable could be changed via Console window. Changing variables' content is pretty useful during debugging, when you run a long test case and you just want to try it with different variable than set from Data Connector and without the need to stop the test, change the data connector and rerun the entire test ;)

Simply, add a breakpoint at a line, where you eventually want to change the variable value. Then when the code breaks, go to Console view and enter string variable assign statement, as you would do in code and simply Enter it. That's all ;) From now on, the String variable has a new content...
ChangeStringVar.png
Hope this helps? ;)