octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64001] "clear all" removes breakpoints while


From: Rik
Subject: [Octave-bug-tracker] [bug #64001] "clear all" removes breakpoints while Matlab does not
Date: Thu, 1 Jun 2023 12:30:49 -0400 (EDT)

Update of bug #64001 (project octave):

                Category:                     GUI => Octave Function        
                Severity:              3 - Normal => 2 - Minor              
                Priority:              5 - Normal => 3 - Low                
              Item Group:                   Other => Matlab Compatibility   
                  Status:                    None => Confirmed              
                 Release:                   8.1.0 => dev                    
        Operating System:       Microsoft Windows => Any                    
                 Summary: Breakpoints are lost after execution and immediately
in called files => "clear all" removes breakpoints while Matlab does not

    _______________________________________________________

Follow-up Comment #7:

Re-titling and re-categorizing this as a Matlab Compatibility item.  The issue
is that "clear all" removes everything in Octave, including breakpoints.  In
Matlab, the breakpoints are preserved.  This is not a severe issue as there
are easy workarounds.

As a diagnosis, the issue is that "clear all" removes both variables and
functions from the symbol table.  The functions in the symbol table store the
breakpoints for the function and, hence, are removed when the function is
removed.

Note, Matlab doesn't recommend using "clear all" at the beginning of scripts. 
As with Octave, this throws out already interpreted and compiled functions
which is a performance hit when they need to be reloaded.

It is much better to be targeted.  If you have a few variables that maintain
state and therefore might influence re-running a script then just clear those
using "clear VAR1 VAR2" or "clearvars VAR1 VAR2".  This can be useful because
if you have spent time loading a gigabyte array into the variable "data" there
is no reason to clear it each time you run the script since it doesn't
maintain state.

If, however, you don't want to analyze your script to determine which
variables are important you could just use "clear" by itself or "clearvars" by
itself which will remove workspace variables, but not affect functions and
their breakpoints.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64001>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]