Results for “print_debug_stuff”

12 results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

WSH_DEBUG_SV is the server-side (SV) diagnostic utility package for the Oracle Shipping (WSH) module. Its business function is to provide a centralized, reusable instrumentation and logging framework that Shipping code—and any other module that calls into Shipping—can use to trace execution, capture runtime diagnostics, and measure performance without embedding ad-hoc logging logic in each program. The package defines the common routines required by Shipping, as stated in its header, and supports multiple output targets: a file, a named pipe, the screen, and SQL trace. Output behavior is governed by profile option WSH_DEBUG_LOG_DIRECTORY, whose value is read into a global variable at package initialization. The package is classified as OTHER in ETRM and is referenced by 239 other packages, which underscores its role as shared infrastructure rather than an end-user-facing API.

Key Procedures and Functions

The package exposes a broad set of documented entry points, the principal ones being NAME, PUSH, START_OTHER_APP_DEBUG, STOP_OTHER_APP_DEBUG, APPEND_OTHER_DBG_FILE, and SET_DEBUG_COUNT; the ETRM records 50 total procedures and functions. Note that a caller searching for "set_debug_count" is directed here.

  • NAME — Returns or resolves the identifying name associated with the current debug context, used to label trace output.
  • PUSH — Pushes a new frame or marker onto the internal call stack (g_CallStack) so nested executions can be tracked and later unwound.
  • START_OTHER_APP_DEBUG — Opens a debug session on behalf of another Oracle application, allowing cross-module tracing.
  • STOP_OTHER_APP_DEBUG — Terminates a debug session previously started for another application, releasing associated resources.
  • APPEND_OTHER_DBG_FILE — Appends diagnostic output generated by another application into the active debug file.
  • SET_DEBUG_COUNT — Sets the debug counter/level used to control how much trace output is emitted; this is the routine referenced by the "set_debug_count" search.

In addition, the header documents the core supporting routines: DEBUG, ENABLE_DEBUG, DISABLE_DEBUG, DEBUG_ENABLED, GET_DEBUG_LEVELS, and PRINT_DEBUG_STUFF.

Tables Accessed

WSH_DEBUG_SV operates primarily on server-side utilities rather than business tables. Its documented references appear through APPS synonyms: UTL_FILE (file and direct-write I/O for debug logs), ALL_SOURCE (source inspection for diagnostic purposes), DBMS_UTILITY (timing and utility calls), and PLITBLM (internal PL/SQL support). A user-visible dependency is the profile option WSH_DEBUG_LOG_DIRECTORY, which supplies the output directory read into g_Dir.

Usage Notes

This package is invoked programmatically, not interactively. Shipping forms, concurrent programs, and custom code call DEBUG, ENABLE_DEBUG, SET_DEBUG_COUNT, and related routines to produce trace information during troubleshooting. It is also used by the ITM asynchronous process, as indicated by the g_itm_asyn_proc flag added for intermittent debugging initialization. Because it is referenced by 239 packages, changes to its public interface should be treated as high-impact. Debug behavior is sensitive to the WSH_DEBUG_LOG_DIRECTORY profile and the internal level constants (FILE, PIPE, SCREEN, SQLTRACE).