error in entering debug mode

View: New views
5 Messages — Rating Filter:   Alert me  

error in entering debug mode

by pauljoseph () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
recently I tried to use the command "keyboard" to enter the debug mode. It behaves strangely.

If I just start Octave, it can enter debug quite clean, but If I rerun the script again, it will give me this error

debug> "error: input: reading user-input failed!"  

and it won't stop until I hit Ctrl-C.
my input file is nothing special, I just put "keyboard" in the line that I want to stop.

anyone knows why? is this a bug? or did I use the command wrongly?
I am using Octave 3.0.0

thanks in advance :)



Re: error in entering debug mode

by David Bateman-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

pauljoseph wrote:

> Hi,
> recently I tried to use the command "keyboard" to enter the debug mode. It
> behaves strangely.
>
> If I just start Octave, it can enter debug quite clean, but If I rerun the
> script again, it will give me this error
>
> debug> "error: input: reading user-input failed!"  
>
> and it won't stop until I hit Ctrl-C.
> my input file is nothing special, I just put "keyboard" in the line that I
> want to stop.
>
> anyone knows why? is this a bug? or did I use the command wrongly?
> I am using Octave 3.0.0


The debug mode doesn't run the code through the parser but instead
treats it line by line.. Therefore in debug mode you can write

for i = 1 : n, y(i) = foo(i); end

but not

for i = 1 : n
  y (i) = foo(i)
end

I imagine your problem is somehow related to that..

D.

_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: error in entering debug mode

by pauljoseph :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> The debug mode doesn't run the code through the parser but instead
> treats it line by line.. Therefore in debug mode you can write
>
> for i = 1 : n, y(i) = foo(i); end
>
> but not
>
> for i = 1 : n
>   y (i) = foo(i)
> end
>
> I imagine your problem is somehow related to that..
>
> D.
>
>

Hi David, thanks for replying, just to clarify how I got the error.

First I inserted keyboard command into my script and it stop. Then I
tried to get out of the debug mode. I couldn't type "exit" or "quit",
but I managed to return to octave:> prompt after I hit Ctrl-C

so now it's suppose to be in the octave prompt because I see
octave:>

then when I run the script again it gives me

>> debug> "error: input: reading user-input failed!"
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: error in entering debug mode

by David Bateman-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oka Kurniawan wrote:

>> The debug mode doesn't run the code through the parser but instead
>> treats it line by line.. Therefore in debug mode you can write
>>
>> for i = 1 : n, y(i) = foo(i); end
>>
>> but not
>>
>> for i = 1 : n
>>   y (i) = foo(i)
>> end
>>
>> I imagine your problem is somehow related to that..
>>
>> D.
>>
>>
>
> Hi David, thanks for replying, just to clarify how I got the error.
>
> First I inserted keyboard command into my script and it stop. Then I
> tried to get out of the debug mode. I couldn't type "exit" or "quit",
> but I managed to return to octave:> prompt after I hit Ctrl-C
>
> so now it's suppose to be in the octave prompt because I see
> octave:>
>
> then when I run the script again it gives me

Humming, that shouldn't happen and I can't seem to duplicate it. I can
quit the debug mode with "quit".

>>> debug> "error: input: reading user-input failed!"

This is the error message from input.cc (get_user_input) when it can't
understand to input its given. Maybe the control-c is the cause of this
issue though I don't see why.

D.
_______________________________________________
Help-octave mailing list
Help-octave@...
https://www.cae.wisc.edu/mailman/listinfo/help-octave

Re: error in entering debug mode

by pauljoseph :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


David Bateman-3 wrote:
Humming, that shouldn't happen and I can't seem to duplicate it. I can
quit the debug mode with "quit".

>>> debug> "error: input: reading user-input failed!"

This is the error message from input.cc (get_user_input) when it can't
understand to input its given. Maybe the control-c is the cause of this
issue though I don't see why.
Sorry my mistake, I can use quit and exit. I just realized it is still in the loop so it will enter into debug again. I thought I couldn't exit.

But I still have the same problem after I use control-C. I will try to see whether I can create a simpler input file that gives the same symptoms. I will send it to you.

Thanks
LightInTheBox - Buy quality products at wholesale price