AnsweredAssumed Answered

Debug PSOS Techniques

Question asked by Andy Hibbs on Oct 3, 2018
Latest reply on Oct 27, 2018 by Andy Hibbs

I'd appreciate input from the community on this one as to how people are debugging PSOS scripts when developing.

 

I've been looking at Matt Petrowsky's Sublime Audit file, where he used:

 

If ( Left ( Get ( FilePath ) ; 7 ) = "fmnet:/"  )

     Perform Script on Server ( ScriptName )

Else

     Perform Script ( ScriptName )

End If

 

This is very useful, as it allows the PSOS script to run when hosted and the ability to run and debug it when running locally without any script change.

 

I'd been looking at Get ( HostApplicationVersion ) which appears to return the FMS Server version when hosted and blank when run locally (not tested if the computer is using P2P sharing). I've also had a look at Get ( HostIPAddress ), which appears to work the same as Get ( HostApplicationVersion ). It seems as if either of these could be used as an alternative to Matt's use of Get ( FilePath ).

 

I've also looked at Get ( HostName ), Get ( SystemIPAddress ), Get ( SystemPlatform ) and Get (SystemVersion) but these seem less useful.

 

Has anyone got strong views on this or is there a defacto method of achieving the run PSOS/run script locally options?

 

Many thanks

 

Andy

Outcomes