dbprintmode

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Debug
Introduced first in SolidGeometry 5.1, Creation date: 2021-11-02, Last change: 2025-09-15

switches on the possibility to reach code lines when using dbprintf fnct

Description

A function, MathWorks should implement for quick debugging. Same functionality also implemented for dbreturn. By using dbprintmode, it is possible to ectivate the openinline function to reach the function call immedeatly

See Also: dbprintflog , dbreturn , dbprintf , dbsave

Example Illustration

 missing image of dbprintmode(md)

Syntax

dbmode=dbprintmode([md])

Input Parameter

md: true or false; default is true;

Output Parameter

dbmode: true or false

Examples

% can be tested only within functns
dbprintf
dbprintmode on
dbprintf




Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, dbprintmode, is designed to toggle a debugging mode in MATLAB, specifically for the SolidGeometry library. It allows users to quickly enable or disable the ability to reach code lines using the dbprintf function.

Input Parameters

Output Results

Algorithm Steps

  1. The function begins by retrieving the input parameter md using the getfuncparams function. If no input is provided, it defaults to 'on'.
  2. If md is a string and equals 'off', it is converted to false. If it equals 'on', it is converted to true.
  3. A global variable SGdbprintmode is used to store the state of the debugging mode.
  4. If md is false:
  5. If md is true:

Example Usage

The function can be tested within other functions using the following commands:

dbprintf
dbprintmode on
dbprintf

This example demonstrates toggling the debugging mode on and off.

Algorithm explaination created using ChatGPT on 2025-08-19 07:23. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21