This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-01-12 12:06:12

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Debug Tools

New post for ideas about debug tools that would be nice to have!

How about this idea for "starters":

Imagine a new feature for the Broadcast and Receive Broadcast Blocks, perhaps a little button or pull-down that would display a list:

Sent by
sprite3
sprite7
sprite9

Rec'd by
sprite1
sprite3

This would have to be an additional pull-down, and the "Sent by" and "Rec'd by" lists would be specific to the Broadcast that was active in the existing pull-down of Broadcasts. 

Broadcasts are powerful, but (like Global variables) they can get messy if you loose track of which sprites are using them to start a script or which sprites are shouting out the broadcast.  This would really be helpful, I think.

-MrEd

Offline

 

#2 2008-01-12 15:38:45

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Debug Tools

I like it, that would be very handy.  Another tool that would be handy would be the Watch function that would report who/what/when/where the value of a specified variable changed or reached a certain value.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-01-15 12:07:07

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: Debug Tools

Building on Paddle2's thought:

Project "Mapping"
Another nice debug tool to have would be the ability to print (or even just display) a list for each sprite that would show:

Sprite1 uses:
SomeVariable of Sprite1 'a local
AnotherVariable of Sprite1  'another local
SomeVariable of Sprite2  'another sprite's local
SomeVariable of Project  'a global

Sprite1 broadcasts:
SomeMessage to Sprite1
SomeMessage to Sprite2
AnotherMessage to Sprite2

Sprite1 receives:
YetAnotherMessage from Sprite3

Or, a simpler way to do this (maybe this would be even better) would be to have "info" available for each variable and broadcast.  The info for variables would be which sprites "use" the variable, and for globals, which sprites change it.  If possible, listing "last changed by: Sprite2" would really be some icing on the cake.  For broadcasts, the info would be who sends it and who receives it.

If this was available, you could "watch" a variable as Paddle2 suggested by adding a loop that said "wait until" (variable > expectedvalue) "Stop All". 

-MrEd

Offline

 

#4 2008-01-15 12:16:29

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Debug Tools

Some great ideas here!  Here's another thought that ties into program mapping:  Each sprite should mention if has the capability to respond to keyboard or mouse events.  Sometimes it's really tough tracking down how the interface is mapped.  I think this idea has been advanced before but it's worth bringing up again.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer