Debug Instrumentation Text File

In most debugging scenarios, debug instrumentation works by creating log entries in a text file, which you then view either with the Instrumentation Log window or an external program. (However, the “crash proof” scenarios described in [Crash Proof Debug Instrumentation] can work without generating a text file.)

Creating a debug log text file is usually done automatically. However, if you don’t want a text file (for example if you are using one of the previously mentioned “crash proof” scenario), you should un-check the Log Path box in the preference panel, as shown below.

Note: An alternate method for disabling the text file output is by un-checking the Save Log to File item in the Instrumentation menu.

By default, the instrumentation output will be put into a file named Panorama X Instrumentation Log.txt in a subfolder of the Application Support folder. You can change both the name and the folder. If you type in a different folder path, Panorama will automatically create the specified folder for you if it doesn’t already exist.

Click the gear icon for a pop-up menu containing common operations that can be performed with the instrumentation log file (these commands also appear in the Instrumentation menu).

Choose Reveal Log in Finder to see the instrumentation log file in the Finder, for example if you wanted to attach it to an email. Another way to put the log into an email would be to choose Copy Log to Clipboard and then paste it into your email client.

The Monitor Log Window command opens the Instrumentation Log window, allowing you to view the text file in real time as it changes without having to leave Panorama. See Debug Instrumentation Log Window to learn more about this window.

The next two Monitor Log commands allow you to view the text file in an external program – either Terminal.app or BBEdit. See Debug Instrumentation Monitoring using an External Program to learn more about this option.

The Copy Log to Clipboard command copies the entire text file to the clipboard, so that you can paste it into a text editor or any other program. Note that this command will work even if the log isn’t currently being displayed.

The Open Log in BBEdit command opens the log file in the BBEdit text editor program (by Bare Bones Software). When you open the file this way it is static – it won’t update as new log information is added to the text file. If you want to dynamically view the log information in BBEdit, use the Monitor Log in BBEdit command.

Choose Archive Log to rename the log file and start fresh with a new log file. The existing log file stays in the same folder, but with the date and time appended to the end, for example Panorama X Instrumentation Log Archive 2020_05_20_10_32_12.txt. Choose Archive Log… to display a dialog that allows you to choose the name and location of the archived file, instead of having Panorama generate the name automatically.

The final option, Clear Log, clears the log so you can start fresh. Whatever is currently in the log is permanently lost.

See Also

- Client/Server Debug Instrumentation -- using instrumentation with Panorama X server and clients.
- Coding with Debug Instrumentation -- modifying your code to generate debug instrumentation output.
- Crash Proof Debug Instrumentation Monitoring -- real time crash-proof instrumentation monitoring
- Customizing Debug Instrumentation Coverage -- specifying what code is being debugged at the moment.
- Debug Instrumentation -- conditional logging of the internal state of Panorama program code.
- Debug Instrumentation Log Window -- dynamically monitor debug instrumentation output as your program runs.
- Debug Instrumentation Monitoring using an External Program -- monitoring debug instrumentation with an external program (Terminal.app, BBEdit.app).
- info("runningunderterminal") -- returns the name of the terminal program if Panorama was launched under one, otherwise it returns empty text.
- labelize( -- returns the value of a field or variable along with a label. This saves typing when you need to display fields or variables when logging and debugging.
- labelizeformula( -- returns the value of a formula along with the formula itself as a label.
- labelizeinfo( -- returns the value of an info( function, along with the function itself as a label.
- labelizepattern( -- formats a text value using a label and a pattern.
- Recording Code Triggers in Debug Instrumentation -- the code triggers option automatically tracks whenever any code is triggered, whether from a menu, a button, or implicitly (for example when data is entered).
- Recording Control Flow in Debug Instrumentation -- configure debug instrumentation to automatically log when control flow is non-linear, for example a call, return, goto, etc.
- setzlog -- turns instrumentation coverage on or off for a specific procedure (or all procedures within a database).
- zlog -- outputs a message to the instrumentation log (if instrumentation is enabled).
- zlogalways -- unconditionally outputs a message to the instrumentation log.
- zlogcoverage -- allows instrumentation coverage to be turned on or off within a procedure.
- zlogdictionary -- outputs a data dictionary to the instrumentation log (if instrumentation is enabled).
- zlogging( -- returns true if zlogging is enabled for the current database and procedure, otherwise false.

History

Version | Status | Notes
10.2 | New | New in this version.