Equivalent of system.diagnostics.debug.writeline in ranorex

Ask general questions here.
pansujit
Posts: 18
Joined: Mon Apr 18, 2016 2:56 pm

Equivalent of system.diagnostics.debug.writeline in ranorex

Post by pansujit » Tue Aug 02, 2016 8:50 am

Hello All,
I am using ranorex 5.4.6 where I can get the console output using system.diagnostics.debug.writeline but what is the equivalent in ranorex 6.0 where system.diagnostics.debug.writeline doesn't work.

Thanking you
Sujit Pandey

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Equivalent of system.diagnostics.debug.writeline in ranorex

Post by Stub » Tue Aug 02, 2016 9:55 am

So I'm very new to Ranorex, still in my evaluation period, but while fiddling I converted some recordings to user code and noted a lot of Report.Log calls were added. e.g.

Code: Select all

Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item '....", the_item.SelfInfo);
Might be what you're after, perhaps.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Equivalent of system.diagnostics.debug.writeline in ranorex

Post by odklizec » Tue Aug 02, 2016 11:26 am

Hi,

I'm not sure about system.diagnostics.debug.writeline, but you can use System.Console.WriteLine instead.
Pavel Kudrys
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

pansujit
Posts: 18
Joined: Mon Apr 18, 2016 2:56 pm

Re: Equivalent of system.diagnostics.debug.writeline in ranorex

Post by pansujit » Tue Aug 16, 2016 11:23 am

Hi,
I want to print something in debug window of ranorex studio, it was system.diagnostics.debug.writeline in ranorex 5.4.6 but what is in ranorex 6.0.1 and 6.0.2. The system.console.writeline is not displaying or printing message on debug window.

Thanking you

Sincerely
Sujit Pandey

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3914
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Equivalent of system.diagnostics.debug.writeline in ranorex

Post by odklizec » Tue Aug 16, 2016 12:03 pm

Hi,

I just tried System.Diagnostics.Debug.WriteLine in 6.0.2 and it seems it works as expected? It correctly enters defined string to Output (debug) window. Are you sure you start your test with attached debugger?
Pavel Kudrys
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Equivalent of system.diagnostics.debug.writeline in ranorex

Post by krstcs » Tue Aug 16, 2016 1:26 pm

In 6.0.0 Ranorex changed the system to default to running with the debugger turned OFF.

As Pavel said, make sure you are running with the debugger attached or you won't get any debug messages or break points.
Shortcuts usually aren't...

pansujit
Posts: 18
Joined: Mon Apr 18, 2016 2:56 pm

Re: Equivalent of system.diagnostics.debug.writeline in ranorex

Post by pansujit » Wed Aug 17, 2016 8:25 am

Hi,
It works after attaching debugger.
Thank you very much for your help.

Sincerely
Sujit Pandey