Shop OBEX P1 Docs P2 Docs Learn Events
KISS Debugger — Parallax Forums

KISS Debugger

youngdaveyoungdave Posts: 70
edited 2009-08-31 05:16 in Propeller 1
Dear All
Does the KISS Debugger allow me to step thru a program and view the changes in variables as I go?
Using tacky little term. statements to view variables is driving me crazy!
TIA David Young

Comments

  • Agent420Agent420 Posts: 439
    edited 2009-08-27 11:35
    You know, I think the KISS debugger may be mis-named...· At least in terms of it's documentation (or lack thereof).·· The web page for the KISS debugger has almost as much advertising for the KISS OS as it does information regarding the product being sold.

    Oddly, I do not see any reference to the term 'Step' in that page.

    This may be a question for Dr. Jim.


    I have been playing a bit with ViewPort, and it does display selected variables being updated as you step through code.· You might want to check out the demo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • he1957he1957 Posts: 58
    edited 2009-08-27 11:44
    Agree with Agent420.

    I would also surmise the KISS debugger is quite specific for the implementation of their project and does not function in the traditional sense of a general purpose code debugger. Their project information may be somewhat sketchy at best but it does centre on an "AI" or "MI" target so it's most likely their debugger is specific for this.


    Cheers,

    HarryE.
  • youngdaveyoungdave Posts: 70
    edited 2009-08-27 11:51
    Viewport is a lot cheaper than I thought. I might go with that. I need something - I'm going crazy trying to keep track of things.
    TIA David Young
  • RsadeikaRsadeika Posts: 3,837
    edited 2009-08-27 12:12
    Keep in mind the Note: Must have .NET Framework 2.0 or later installed. For some Windows developers this is not a problem, but for a casual user of Viewport, this might be overhead that somebody just may not want to deal with. That is one of reasons I quit working with C#, I did not want to ask people to install .Net, just to run my program.

    Ray
  • SRLMSRLM Posts: 5,045
    edited 2009-08-27 12:41
    There are also several free debuggers floating around the forum, mostly for PASM. I like PASD.
  • jazzedjazzed Posts: 11,803
    edited 2009-08-27 13:45
    I wrote a command line Spin debugger and an on-chip PASM debugger ... don't need .net. They are available on the forum. Check my signature.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • youngdaveyoungdave Posts: 70
    edited 2009-08-27 19:27
    I've just found:
    PE Kit Tools - Debug LITE for the Parallax Serial Terminal

    I'll give that a try first.

    TIA David Young
  • Agent420Agent420 Posts: 439
    edited 2009-08-27 20:02
    One thing I've noticed with the 1 or two debuggers I've tried (have not used Spud or PE Kit yet) is that they seem to be constrained to the originating cog; in other words, if you are stepping through code in one cog and it makes a call to an object in another cog, the debugger simply treats that call as an entity and does not follow the code in the second cog.

    Do any of these dubuggers perform that function?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-08-27 20:07
    I have to agree with Ray about the .NET issue. That is one heavy load of stuff to impose on users and has deterred me from using anything that requires it. It's also part of the reason, along with language and portability issues, that I switched from Visual BASIC to Perl/Tk for host program development.

    -Phil
  • NetHogNetHog Posts: 104
    edited 2009-08-27 20:08
    Agent, can you give me a code snippet of "calling to an object in another cog" ?
  • jazzedjazzed Posts: 11,803
    edited 2009-08-27 20:09
    @Agent420, No one does that as far as I know. I plan to add a "Thread" command to Spud for doing this, but motivation for doing that is hampered greatly by lack of feedback. The phrase "no news is good news" usually does not apply in software testing. It usually means, well it didn't work past here so I gave up. But I'll never know [noparse]:)[/noparse] Paradox?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • youngdaveyoungdave Posts: 70
    edited 2009-08-28 00:48
    Does anyone know how to customize the variable names in the Viewport Watch window?
  • HannoHanno Posts: 1,130
    edited 2009-08-28 01:05
    There are 2 ways.
    Either click "Configuration/Wizard" and change your configuration there.

    Or, open any view other than the "Debug" view and click on the variable name in the "ViewPort" pane on the bottom right.

    You'll get a wizard in which you can change the name, as well as lots of other properties. You can display the values as binary, hex..., you can add units, you can add controls, like sliders or dials to change the variable and much more. You can save your configuration to a file, or even better, copy it to a clipboard and paste as spin code into your program. If you paste it into your program, ViewPort will use your custom settings for that program. Andy's PE lab does a great job explaining this.

    When I started, I was apprehensive about forcing people to install the .NET framework. I chose to use .NET 2.0 because it was already installed on all the machines that I came across. Now, 2 years later I've had less than a handful of people who had an issue with it. And I've been very impressed with MONO.NET, it looks like I just need to make a few minor changes to get ViewPort/12Blocks/PropScope working on anything that MONO supports- Mac, Linux....
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!

    Post Edited (Hanno) : 8/28/2009 1:11:19 AM GMT
  • youngdaveyoungdave Posts: 70
    edited 2009-08-28 02:37
    Changes in Configuration/Wizard and the "ViewPort" pane don't seem to stick.
  • HannoHanno Posts: 1,130
    edited 2009-08-28 02:46
    Changes should stick as long as you don't load a program to the propeller, or quit ViewPort. Once you like settings, use the "configuration/copy clipboard" to copy the cfg strings to your Program- ahead of the vp.share statement. Andy's PE Lab does a great job explaining all this!
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
  • jazzedjazzed Posts: 11,803
    edited 2009-08-28 02:52
    Hanno, I've gone through Andy's PE lab and still have trouble.

    To be specific, once I get the debug session started, I have trouble after
    making changes to the spin in getting the session restarted with the changes.
    This is not in Andy's PE lab. Perhaps you can enumerate the procedure.

    (sig disabled out of respect)
    --Steve

    Post Edited (jazzed) : 8/28/2009 3:55:17 AM GMT
  • youngdaveyoungdave Posts: 70
    edited 2009-08-28 03:47
    Hanno
    The variable values in the Watch window are chopped off after five digits. How do I expand the display width?
    TIA David Young
  • HannoHanno Posts: 1,130
    edited 2009-08-28 05:20
    Dave,
    The "Watch" window in the "Debug" view shows the variable, the address in main memory, and the value.
    Clicking on the blue "address" will scroll the memory viewer to that location. It's only 4 digits long and in Hex because that's sufficient to address the Propeller.

    Ahhhh, I see you're issue. On my screen the ViewPort window is ~1000 pixels wide- whatever it defaults to. At this width, the blue "value" field has space for 7 digits. Your ViewPort window seems to be smaller... So, simple solution is to resize your ViewPort window. Or, drag the divider- the vertical line between the "watch" window and the "propeller" window.


    Steve,
    Here's a sample procedure- let me know where you need more details:
    - Start ViewPort
    - Select "00_Debug", then click "Debug"
    - This will start the debugger on the "00_Debug" program, which uses variable "a" to count up to "b", at which point it increments "c".
    - Click "pause" to pause the cog, the yellow highlight tells you which line of spin code will run next.
    - In the "watch" window, you'll see variables a,b,str, and c. You can click and change the value. For example, set "c" back to 0 and then press the triangular "play" button again.
    - Stop debugging using the square "stop" button.

    - Now, let's change the name of the "c" variable to "dddd".
    - In the top left pane you'll see "ViewPort Configuration", this file contains this configuration string:
    "vp.config(string("var:a,b,str(string=20),c"))
    Change it so it says:
    "vp.config(string("var:a,b,str(string=20),dddd"))
    - Switch back to the "00_Debug" tab, then click the triangular "play" button- you should see "dddd" in the "watch" pane.

    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
  • jazzedjazzed Posts: 11,803
    edited 2009-08-28 05:45
    Everything seemed to work for a few rebuilds, but now all I get is an error message box that says something about circular error with conduit. I close and restart the app, and get the same message at startup. I'm stuck. What do you suppose happened?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • youngdaveyoungdave Posts: 70
    edited 2009-08-28 05:56
    Hanno
    I have my screen set to 1024x768, but changing it to 1280x800 it makes no diff.
    Dragging the divider to the right makes no diff.
    I need to display long variables in bin, so it needs a fair bit of space!
    TIA David Young
  • HannoHanno Posts: 1,130
    edited 2009-08-28 06:57
    When it rains it pours!

    Dave,
    Ok, looks like I only display 7 digits, so if you're using binary, it'll display 6 digits and the % symbol in the watch window.
    This is true for the "hover over variable" to watch as well... Possible workaround is to use hex?
    Thanks for letting me know, I'll have this fixed by Monday.

    Steve,
    Sorry about that! Off hand I don't know what a "circular" error is. ViewPort's error message should give you the chance to send me an error report, that contains a stack trace and more details which may help me resolve the issue. Do the sample tutorials still work? If they do, and your program doesn't, it may lie with your program- I'll take a look if you want to pm it to me or post it...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
    824 x 743 - 75K
  • youngdaveyoungdave Posts: 70
    edited 2009-08-28 07:13
    Hanno
    Hex is no good. But I can wait till Monday if I can display longs in bin.
    Another thing that might screw up your day even more - the Watch pane shows red values at blue addresses, but the Memory pane shows only zeros! Have I got some setting wrong?
    TIA David Young
  • HannoHanno Posts: 1,130
    edited 2009-08-28 07:25
    David,
    Yes, I'll post the fix to watch all 32bit of a long by Monday.
    The 32KB of memory is dumped when you hit the "pause" or "step" commands. Unlike the variables, it's not transmitted continually. So, it is possible to have a "fresh" value in the "watch" pane, while the memory map is stale. Click the "step", or "pause" button and see if that resolves this issue. I had thought about disabling the memory map when it's data might not be valid- but others have liked it the way it is...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
  • jazzedjazzed Posts: 11,803
    edited 2009-08-28 07:58
    The sample debug_00 program causes the error. All I did was change c to dddd as you suggested and reloaded a few times. Now I can't get that or any other example to work at all. There is no stack dump, just a message box. I'm attaching a png.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
    1169 x 857 - 136K
  • HannoHanno Posts: 1,130
    edited 2009-08-28 08:17
    Hi Steve,
    I don't yet know how, but I think your "conduit.spin" file is corrupt- if you post it I might be able to figure out what happened... I could give you a replacement, but I see you're running 4.1.4- I like to think that I've made lots of improvements since then. Current release is 4.1.66 it's here: http://mydancebot.com/viewport/thanks.php

    Even better, but used by less people is 4.2.1- here: http://forums.mydancebot.com/viewtopic.php?f=4&t=72 This includes the DDE server which you can use to integrate with Matlab, Excel, VB.NET, C# and more...

    I'll update that to 4.2.2 by Monday with Dave's fix...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
  • Agent420Agent420 Posts: 439
    edited 2009-08-28 09:53
    NetHog said...
    Agent, can you give me a code snippet of "calling to an object in another cog" ?
    I'm still getting the Prop lingo down, so apologies if I am not using the correct terminology...· What I mean is something like a reference to a method in another cog.

    Something like

    OBJ
    

        Blinker : "Blinker"
        Button  : "Button"
    

    PUB ButtonBlinkTime | time
    

        repeat
    

           time := Button.Time(23)
           Blinker.Start(4, time, 20
    

    The debuggers just step through the repeat loop pausing at the time and blinker lines rather than following the actual code they contain; you never get to see the execution of the time and blinker objects.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • jazzedjazzed Posts: 11,803
    edited 2009-08-29 05:43
    Hanno, somehow my debug_00.spin copy over-wrote conduit.spin. I'll look for your update.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • HannoHanno Posts: 1,130
    edited 2009-08-31 05:16
    It's Monday here in NZ, so v4.2.2 is available from my "Beta" page:
    ]forums.mydancebot.com/viewtopic.php?f=4&t=72]

    Improvements over v4.2.1:
    - New Propellent
    - Improvements to terminal- faster and now clears to end of line on command
    - DDE server returns all elements of an array when using formats 1, 11, and 12
    - Debug Watch window shows all 32 bits of a watched variable in binary mode
    - Waveforms are graphed more cleanly
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Download a free trial of ViewPort- the premier visual debugger for the Propeller
    Includes full debugger, simulated instruments, fuzzy logic, and OpenCV for computer vision. Now a Parallax Product!
Sign In or Register to comment.