diff --git a/src/gmt_api.c b/src/gmt_api.c index fd543f4a1b7..1cfbd15e515 100644 --- a/src/gmt_api.c +++ b/src/gmt_api.c @@ -11034,6 +11034,12 @@ int GMT_Call_Module (void *V_API, const char *module, int mode, void *args) { else { /* Call the function and pass back its return value */ gmt_manage_workflow (API, GMT_USE_WORKFLOW, NULL); /* First detect and set modern mode if modern mode session dir is found */ gmtapi_check_for_modern_oneliner (API, module, mode, args); /* If a modern mode one-liner we must switch run--mode here */ + if (API->external && gmt_M_is_verbose (API->GMT, GMT_MSG_DEBUG)) { + /* For externals only, print the equivalent command-line string under -Vd */ + char *text = (mode == GMT_MODULE_OPT) ? GMT_Create_Cmd (API, args) : args; + GMT_Report (API, GMT_MSG_DEBUG, "GMT_Call_Command string: %s %s\n", module, text); + if (mode == GMT_MODULE_OPT) GMT_Destroy_Cmd (API, &text); + } status = (*p_func) (V_API, mode, args); /* Call the module in peace */ } return (status);