Re: .trace not working? [message #67599 is a reply to message #67597] |
Thu, 06 August 2009 05:13   |
Bruce Bowler
Messages: 128 Registered: September 1998
|
Senior Member |
|
|
On Wed, 05 Aug 2009 14:16:58 -0700, BLemire@ittvis.com wrote:
> On Aug 5, 2:13 pm, Bruce Bowler <bbow...@bigelow.org> wrote:
>> Environment IDL 7.0 (and 7.1) on fedora 10 (and fedora 11), 32 bit
>> version
>>
>> Imagine, if you will, a simple .pro file such as the following (never
>> mind that this doesn't really do anything)...
>>
>> pro test1
>> x = randomn(seed1, 16)
>> y = randomn(seed2, 16)
>> plot, x, y
>> end
>>
>> Now imagine that you fire up IDL and type the following commands at the
>> IDL> prompt
>>
>> breakpoint,"test1.pro",2
>> test1
>>
>> and further, attempt to stretch you imagination to the point that, when
>> you get to the IDL prompt as a result of the breakpoint, you type
>>
>> .trace
>>
>> You, of course, type that particular command because the documentation
>> says, and I quote,
>>
>> .TRACE - Similar to .CONTINUE, but displays each line of
>> code
>> before execution.
>>
>> but when you hit the return key at the end of .trace, you see no
>> additional outputting of code prior to executing each line of code.
>>
>> Where have you gone wrong???
>>
>
> Bruce,
>
> Based on the documentation in IDL 70 and IDL 71 the following
> description is provided for the .TRACE command:
>
> "The .TRACE command continues execution of a program that has stopped
> because of an error, a stop statement, or a keyboard interrupt."
>
> This definition was located in
>
> IDL API Reference Guides > IDL Reference Guide > Part I: IDL Command
> Reference > Dot Commands
>
> This documentation is different than that which would be available in
> printed form. The change from the definition you had to the new
> definition occurred in IDL 4.0.1 for exactly the reason you provided. I
> hope that this helps.
>
> Based on the implementation of the .TRACE command, it is only supposed
> to complete executing the code. I was able to get the code to complete
> as expected. It might be helpful if a verbose keyword was added to the
> .TRACE command so that each line of code was output prior to execution.
>
> Best Regards,
>
> Brandon
2 things...
First, it's worth noting, the text I quoted is from idlhelp that shipped
with idl 7.0.
From the top of the idlhelp window,
IDL API Reference Guides > IDL Reference Guide > Part I: IDL Command
Reference > Functional List of IDL Routines (and then select debugging)
Second, You state "for exactly the reason you provided", but I didn't
provide a reason, I provided a question. Why doesn't trace work as
documented (or to put in Mike's terms, why have .trace if it is now
exactly like .continue?)
Is there a *SUPPORTED* (hell, at this point I'd take unsupported) way to
TRACE the execution of a routine?
Bruce
--
+-------------------+--------------------------------------- ------------+
Bruce Bowler | Honor thy father and thy mother, for they shall be
1.207.633.9600 | interviewed. - Emo Phillips
bbowler@bigelow.org |
+-------------------+--------------------------------------- ------------+
|
|
|