Hi , I ahve a code where i am stepping during Debug and I want watch some variables.
I am not able to do so when I add the variable name into the Watch WIndow by explicitly typing it.
E.g below code
EnvironmentVariable = Utility.XMLUtility.Fn_Read_XmlFile( COMOS.Utility.FileUtil.Fn_GetParentOfCurrentDirectoryPath() + @"\Configuration\Environment.xml" );
Fn_GetFormattedCurrentDateTime = COMOS.Utility.FileUtil.Fn_GetFormattedDateTime();
//Run Testsuite
error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);
Unable to retrieve value when added to Watch window Environment.CommandLine
This variable is of type Dictionary.
Watching variables within the code
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Watching variables within the code
Hi smitaninad,
I created a dictionary to reproduce the issue, but in my case I was able to watch the variable of type dictionary without issues.
May I therefore ask you how you added the variable to the Watch list and which name you added?
What kind of information do you want to get, do you see the information in the Local variables view?
Regards,
Markus
I created a dictionary to reproduce the issue, but in my case I was able to watch the variable of type dictionary without issues.
May I therefore ask you how you added the variable to the Watch list and which name you added?
What kind of information do you want to get, do you see the information in the Local variables view?
Regards,
Markus
Re: Watching variables within the code
I tried creating a dictionary too. sometimes intellisense works for the obkect but most of the times it does it.so i cannot see the items inside the dictionary. The local variable window does not show the variable too.what could be the reason? otherwise the code works for for another testcase scenario.
Dictionary<string, string> DataDict= new Dictionary<string, string>();
DataDict.Add(a,b);
Can someone please help with this?
Dictionary<string, string> DataDict= new Dictionary<string, string>();
DataDict.Add(a,b);
Can someone please help with this?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Watching variables within the code
Hi Laks,
This is strange, in my case I can see it in the local variable window and the intellisense also works as expected.
May I therefore ask you which Ranorex version you are using and if you are using any different project settings?
Do you work with a single Ranorex solution/project, or do you have different projects in your solution?
Thanks,
Markus
This is strange, in my case I can see it in the local variable window and the intellisense also works as expected.
May I therefore ask you which Ranorex version you are using and if you are using any different project settings?
Do you work with a single Ranorex solution/project, or do you have different projects in your solution?
Thanks,
Markus
Re: Watching variables within the code
Actually I have a debugging question too. I experienced several times that local variable window just throw exceptions when I tried to expand some variables. That's not so critical since I don't use it everyday.
However, my typical issue is with watch window. Maybe I don't know how to use it. I tried to use the same way as VS IDE.
for example, if I add a simple variable name to the watch window, the value can be presented without any issues.
if I have two strings, each can be presented in the watch window. however if put variable1+variable2 in the watch window, it will give an error.
If someClass.constanst.delay is valid expression, I can move my mouse to see the actual value. However, if I put this statement in the watch window, error then occurs.
However, my typical issue is with watch window. Maybe I don't know how to use it. I tried to use the same way as VS IDE.
for example, if I add a simple variable name to the watch window, the value can be presented without any issues.
if I have two strings, each can be presented in the watch window. however if put variable1+variable2 in the watch window, it will give an error.
If someClass.constanst.delay is valid expression, I can move my mouse to see the actual value. However, if I put this statement in the watch window, error then occurs.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Watching variables within the code
Hi c676228,
I assume the variable "someClass.constanst.delay" is a static one, right?
If so, this is unfortunately a known limitation of Ranorex Studio and doesn't work.
We are working on upgrading Ranorex Studio to a newer SharpDevelop version and watching static variables should work with the new version, but I am afraid I cannot give you a date when the new Ranorex Studio version will be released.
Regarding the "variable1+variable2" expression, I am afraid this is also not possible, but I will forward this as a feature request.
Regards,
Markus
I assume the variable "someClass.constanst.delay" is a static one, right?
If so, this is unfortunately a known limitation of Ranorex Studio and doesn't work.
We are working on upgrading Ranorex Studio to a newer SharpDevelop version and watching static variables should work with the new version, but I am afraid I cannot give you a date when the new Ranorex Studio version will be released.
Regarding the "variable1+variable2" expression, I am afraid this is also not possible, but I will forward this as a feature request.
Regards,
Markus
Re: Watching variables within the code
Hi Markus,
No matter you cannot tell us the release date of Ranorex with more recent SharpDevelop, it's indeed a great news you are already working on it!
No matter you cannot tell us the release date of Ranorex with more recent SharpDevelop, it's indeed a great news you are already working on it!

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Watching variables within the code
Thanks for recognizing the limitations and adding the feature.
I have mentioned in several threads about the Ranorex debugging tool.
Basically the watch window only can be used for some simple variables, even expression like arr or arr["column1"] won't work. Not mentioning expression, statement in the watching window.
I have mentioned in several threads about the Ranorex debugging tool.
Basically the watch window only can be used for some simple variables, even expression like arr or arr["column1"] won't work. Not mentioning expression, statement in the watching window.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Watching variables within the code
Hi c676228,
Thank you for your feedback.
Regards,
Markus
Thank you for your feedback.
Regards,
Markus