Sign in

username:

password:



Not a member?

Search oopic



Search tips

Subscribe to oopic



Ads

Discussion Groups

Discussion Groups | | debugging

debugging - Brian Lloyd - Mar 9 10:48:25 2008

I have run into a bit of a debugging problem and would love to be able=20=20
to look at the state of an object or a variable at run time. I would=20=20
also like to be able to set a breakpoint in the execution. Is this=20=20
possible?
--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )


Re: debugging - Andrew Porrett - Mar 9 11:24:19 2008

At 10:39 AM 3/9/2008, Brian Lloyd wrote:
>I have run into a bit of a debugging problem and would love to be able
>to look at the state of an object or a variable at run time.

You can use the serial port object to send debug data messages to
your PC and you can use SCP commands from the PC to query object and
data states and values.
> I would
>also like to be able to set a breakpoint in the execution. Is this
>possible?

You want the code to stop running when it reaches a specific
instruction? You could wait for input / state change on a port
(serial or otherwise)
...Andy



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: debugging - Brian Lloyd - Mar 9 11:56:32 2008


On Mar 9, 2008, at 8:20 AM, Andrew Porrett wrote:

> At 10:39 AM 3/9/2008, Brian Lloyd wrote:
>> I have run into a bit of a debugging problem and would love to be=20=20
>> able
>> to look at the state of an object or a variable at run time.
>
> You can use the serial port object to send debug data messages to
> your PC and you can use SCP commands from the PC to query object and
> data states and values.

Hmm, I would expect this to be a function of the debugger in the IDE.=20=20
I guess that is why I am having difficulty finding it. :-)

It does appear that, at least with 6.11, I can open and query the=20=20
state of an attribute in an object in the object browser.

>> I would
>> also like to be able to set a breakpoint in the execution. Is this
>> possible?
>
> You want the code to stop running when it reaches a specific
> instruction?

Absolutely.

> You could wait for input / state change on a port
> (serial or otherwise)

Yes I can but that strikes me as a bit of a kludge. I was=20=20
hoping for something a bit more, uh, integrated. But, yeah, I can tie=20=20
a switch to an I/O port and wait on it.

General question: over the course of my professional career I have=20=20
been spoiled by having good source and object code debugging tools.=20=20
Are these not common in the microcontroller world? Come to think of=20=20
it, I certainly haven't run across any.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: debugging - Andrew Porrett - Mar 9 12:50:14 2008

At 11:54 AM 3/9/2008, Brian Lloyd wrote:
>Hmm, I would expect this to be a function of the debugger in the IDE.
>I guess that is why I am having difficulty finding it. :-)

Sorry, I don't use the debugger. The IDE that came with the V5
compiler had its own bugs...
>It does appear that, at least with 6.11, I can open and query the
>state of an attribute in an object in the object browser.

So that's half the battle right there...
> Yes I can but that strikes me as a bit of a kludge. I was
>hoping for something a bit more, uh, integrated. But, yeah, I can tie
>a switch to an I/O port and wait on it.

Just call breakpoint() wherever you want a breakpoint. Of course,
you get to write the function...
>General question: over the course of my professional career I have
>been spoiled by having good source and object code debugging tools.
>Are these not common in the microcontroller world? Come to think of
>it, I certainly haven't run across any.

I haven't played with enough platforms to give a meaningful answer.
...Andy



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: debugging - Brian Lloyd - Mar 9 18:45:22 2008

On Mar 9, 2008, at 3:30 PM, Ian Drennan wrote:

>> Yes I can but that strikes me as a bit of a kludge. I was
>> hoping for something a bit more, uh, integrated. But, yeah, I can tie
>> a switch to an I/O port and wait on it.
>>
>> General question: over the course of my professional career I have
>> been spoiled by having good source and object code debugging tools.
>> Are these not common in the microcontroller world? Come to think of
>> it, I certainly haven't run across any.
> Brian
>
> If you are needing to watch objects dynamically you might want to=20=20
> take a
> look at the Object Watcher tool which is in the Files Section of this
> group. With this read only tool you can look at all objects and their
> properties as well as non object variables.

I will go look. I forget that there is more here than just the mailing=20=20
list.

> I wrote it a few years back when Ver 6 was still in Beta and before=20=20
> any
> of the current debugging features were working.

Besides being able to look at the properties of an object, are there=20=20
any other debugging tools that are part of the IDE? I have looked but=20=20
I haven't seen anything I recognize as a debugging tool.

> It is useful for some
> debugging and for generally seeing what is going on inside the=20=20
> objects.
> All values can be displayed in Decimal, Hex and Binary.

I will grab that. Thank you for the pointer.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: debugging - ooPIC Tech Support - Mar 9 23:57:18 2008

Using the right pane in the V.6 compiler you can query the state of any
object at run time over the serial line. There is no break point
capability built into the IDE as of yet. It would be very useful.

DLC

Brian Lloyd wrote:
> I have run into a bit of a debugging problem and would love to be able
> to look at the state of an object or a variable at run time. I would
> also like to be able to set a breakpoint in the execution. Is this
> possible?
> --
>
> Brian Lloyd Granite Bay Montessori
> brian AT gbmontessori DOT com 9330 Sierra College Blvd.
> +1.916.367.2131 (voice) Roseville, CA 95661, USA
> http://www.gbmontessori.com
>
> I fly because it releases my mind from the tyranny of petty things . . .
> — Antoine de Saint-Exupéry
>
> PGP key ID: 12095C52A32A1B6C
> PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C
>
>
>



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: debugging - Brian Lloyd - Mar 10 0:14:37 2008


On Mar 9, 2008, at 8:48 PM, ooPIC Tech Support wrote:

> Using the right pane in the V.6 compiler you can query the state of=20=20
> any
> object at run time over the serial line.

Yes, I am using that.

> There is no break point
> capability built into the IDE as of yet. It would be very useful.

Yes, it would. I did create a data object and then assign it a=20=20
different value depending on where it was in the code. That is how I=20=20
found that my problem was elsewhere from where I thought it was.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: debugging - Ian Drennan - Mar 10 1:46:03 2008

Brian Lloyd wrote:
> On Mar 9, 2008, at 8:20 AM, Andrew Porrett wrote:
>
>
>> At 10:39 AM 3/9/2008, Brian Lloyd wrote:
>>
>>> I have run into a bit of a debugging problem and would love to be
>>> able
>>> to look at the state of an object or a variable at run time.
>>>
>> You can use the serial port object to send debug data messages to
>> your PC and you can use SCP commands from the PC to query object and
>> data states and values.
>>
>
> Hmm, I would expect this to be a function of the debugger in the IDE.
> I guess that is why I am having difficulty finding it. :-)
>
> It does appear that, at least with 6.11, I can open and query the
> state of an attribute in an object in the object browser.
>
>
>>> I would
>>> also like to be able to set a breakpoint in the execution. Is this
>>> possible?
>>>
>> You want the code to stop running when it reaches a specific
>> instruction?
>>
>
> Absolutely.
>
>
>> You could wait for input / state change on a port
>> (serial or otherwise)
>>
>
> Yes I can but that strikes me as a bit of a kludge. I was
> hoping for something a bit more, uh, integrated. But, yeah, I can tie
> a switch to an I/O port and wait on it.
>
> General question: over the course of my professional career I have
> been spoiled by having good source and object code debugging tools.
> Are these not common in the microcontroller world? Come to think of
> it, I certainly haven't run across any.
>
>
Brian

If you are needing to watch objects dynamically you might want to take a
look at the Object Watcher tool which is in the Files Section of this
group. With this read only tool you can look at all objects and their
properties as well as non object variables.
I wrote it a few years back when Ver 6 was still in Beta and before any
of the current debugging features were working. It is useful for some
debugging and for generally seeing what is going on inside the objects.
All values can be displayed in Decimal, Hex and Binary.

Ian



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )