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

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

[Octave-bug-tracker] [bug #56860] Debugger can not enter functions in sc


From: anonymous
Subject: [Octave-bug-tracker] [bug #56860] Debugger can not enter functions in scripts
Date: Wed, 4 Sep 2019 16:49:01 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0

URL:
  <https://savannah.gnu.org/bugs/?56860>

                 Summary: Debugger can not enter functions in scripts
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 04 Sep 2019 08:48:59 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error
                  Status: None
             Assigned to: None
         Originator Name: Paul Fobbester
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: Any

    _______________________________________________________

Details:

Given the input file:


#Script, not a function...
1;

function [sum]=add(a,b)
  sum=a+b;
endfunction

c=4;
d=5;
result=add(c,d);
disp(result);


then this will produce and display the correct result: 9.

However if you set a breakpoint in the function, should you wish to debug it,
then the debugger then fails. For example with the above code in the file
'bug.m' the following output is produced:


>> dbstop("add")
ans =  5
>> bug
error: add: no such file, ''
error: called from
    add at line 5 column 6
    bug at line 10 column 7
>>


i.e. the breakpoint was correctly set at line 5 of the script but the debugger
will not enter the function.

The same behavior is observed in linux and windows versions.

As a work around the debugger does work if every function is stored in its own
individual function file, rather than a script.

If this is not a bug then the documentation could be improved to make this
behavior clear. In any case, thank you for a fantastic product.






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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