cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

How to output debugging information from Styler 8.3.1

RichardSteadman
10-Marble

How to output debugging information from Styler 8.3.1

Hi,

 

I used to use Perl in APP-over-rides to output debugging information to a file like this:

 

  formatting.evaluateShowString("\"junk\"$^[perl open(TMP, '>>c:/temp/debug.log'); print TMP 'specific-use: " + currentNode.getAttribute("specific-use") + "\n'; close(TMP);]");

 

This appears to no longer be working. But was pretty "hacky" anyways. Is there a cleaner way of outputting debugging information to a file or log somewhere?

 

Thanks,

Richard Steadman

3 REPLIES 3

Hello Richard, FYI Perl support was removed from Editor a few versions ago.

 

Bryon

Hi Bryon,

 

Thanks! My understanding was that it was no longer included by default, but you could add it back in (which we did).

 

Regards,

Richard

 

Ok, I sorted it out.

This particular help page shows how to create external log files (or even write to the Styler Event log):

https://support.ptc.com/help/arbortext/r8.3.1.0/en/index.html#page/styler/appintrostyle/help20078.html#

 

Quick summary:

 

var log = application.logs[5];
log.open(1, "C:/temp/styler.log");

log.write("Attribute" + currentNode.getAttribute("test") + "\n");

log.close();

var eventLog = application.logs[1];
eventLog.write("test");

 

Announcements

Top Tags