NBC debugger for LEGO Mindstorms NXT

http://www.sorosy.com/lego/nxtdbg/

LOTS of features! Looks very useful but haven’ t tried it.

3 levels of debugging

* Level 0: variable control only; start/stop and watch/modify variables; supports debug logs, but not debug breaks. Executable size and execution speed is comparable to normal size and speed.
* Level 1: pause/continue; start/stop/pause/continue support, watch/modify variables; supports debug logs, and hard coded debug breaks. Executable size is about 1.5x and execution speed is about 2.5x slower than normal size and speed.
* Level 2: step-by-step; start/stop/pause/continue/step into/step out/step over support, run to cursor, watch/modify variables; supports debug logs, hard coded and at run time defined soft debug breaks. Executable size is about 2x and execution speed is about 4x slower than normal size and speed.

BricxCC integration

* Compile and Debug menu item in the Compile main menu
o 1 touch compile, load into debugger, connect debugger to device (pre-requisite is that BricxCC is connected already and the debugger can inherit the same connection) and download code to NXT
o NBC bugs and errors need to be fixed with regular compilation before debug compilation
* Debugger Preferences menu item in the Compile main menu
o Preference dialog opens from BricxCC can be used to set debug level to one of the above mentioned

Basic debugger functionality

* Start program execution
* Stop program execution
* Restart execution
* Step into subroutines
* Step out of current subroutine
* Step over subroutines without debugging
* Source code integration
* Select any thread in case of multi-threaded program and debug that particular thread
* Look through entire call stack for any thread, jump to any call level in call stack
* Watch and modify variable values
* Debug logging
* Break points and debugbreaks
* Copy full debug status to clipboard
* Optional periodical data collection from NXT during program execution, period can be from 1 to 30 seconds or off
* Data communication status lights shows when there’s communication (and which direction) between the debugger and the NXT
* Keep alive, do not let NXT brick turn off while debugger is connected
* Optional window graphical watermarking for easy understanding of each window’s functionality
* Splitter window structure with source code, debug log, breakpoint, variable watch, threads and call stack windows

Debug logging

* Simple debug log
* Multi-segment debug log built form max 16 segments, each can be a constant string in ’’ marks, a string or numeric value
* Asynchronous debug log transfer from NXT device
* A log line entry can be up to 56 characters, rest of the line is truncated
* Set font size
* Clear debug log window
* Copy one line or full log to clipboard
* For more details see the Debug Logging and Data Charting Tutorial

Debug breaks and breakpoints

* Unlimited hard coded debug break in source code
o Enabled or disabled at run-time, each one equipped with hit counter which is visible in the UI, can be tested and reset at any time
o Unconditional (breaks before executing next line)
o Simple conditional (comparison of 2 variables or 1 variable and 1 constant value, breaks into debugger when logical expression evaluates as true)
o Counter type (breaks into debugger when execution passes the debugbreak and hit count is equal or larger then a specified value, optional automatic resetting of counter)
* Unlimited soft break points, defined, removed, enabled or disabled at run-time
o For performance reasons only 1 soft break point can be enabled per subroutine
o Displays location, type (hard or soft) and hit count for each breakpoint
o Tool-tip-like yellow pop-up window for all lines that are too long, partially not visible and truncated shows location, type and hit count
o Enable all/disable all
o Hit count follows how many times program execution passed through each hard coded debugbreak, hit count can be reset at any time from debugger
o Double click to show breakpoint line in source window
o Copy one or all breakpoint information to clipboard
* For more details see the Debug Breaks and Breakpoints Tutorial

Source code integration

* Find subroutines or threads by name in the project
* Jump to definition of any subroutine, thread, variable, label, macro or file in the project
* Add variables to watch window
* Follow test execution step-by-step during debugging
* Next instruction to be executed is marked in left margin
* All soft breakpoints and hard coded debugbreaks are color coded and show enabled/disabled state in left margin
* Show next instruction: jump back in the source code to the line to be executed
* Modify next instruction: force the execution to continue from an other line within the thread or subroutine
* Run to cursor: select a line anywhere in the project, and run until that line is being executed. At that point the program will stop in the debugger. Other breakpoints can stop execution before hitting the specified line.
* Point to any line and add, remove, enable or disable a soft break point
* Point to any line and enable or disable a hard coded debugbreak
* User selected font

Variable watch and modify

* Display and modify each variable, array item or cluster item during program execution or while execution is paused
* 3 modes
o Show all variables (full mode)
o Show only user selected variables (user mode)
o Show variables in currently executed section (auto mode)
* Display variable name, type and value
o For arrays display array type and length
o For byte-type arrays display arrays as string values
* Tool-tip-like yellow pop-up window for all lines that are too long, partially not visible and truncated shows name, type and value
* Recognize that NXT memory is corrupt and gray out variable window if that happens
* Full support for viewing unlimited dimension nested arrays and clusters (limited only by NXT memory)
* Collapsible/expandable structure for clusters and arrays
* Filter any variable, array or cluster; filter array or cluster items together or individually
* Fully collapse or full expand all variables with one click
* Copy one or all the variables with values and type to clipboard

Threads and call stacks

* Display each parallel thread’s current execution location with subroutine or thread name, file name and line number
* Click on any thread to show it’s currently executing instruction, and select for debugging
* Display full call stack for the current thread selected in threads window
* Display subroutine’s name, file name and line number
* Click on any call to show it’s currently executing instruction source code, and select for debugging
* Tool-tip-like yellow pop-up window for all lines that are too long, partially not visible or truncated
* Copy one or all the threads with location to clipboard
* Copy one or all the call stack items with full location to clipboard

Advertisements

One response to “NBC debugger for LEGO Mindstorms NXT

  1. NBC Debugger Beta 2 has been released. New features:
    – Added motor start/stop syncronization with the program’s debug run/pause/stop state
    – Added context menu to breakpoint window and variable watch window
    – Added ability to remove user watch variables
    – Performance tuned file loading and initializing improved load time by over 70%
    – Added source code syntax coloring based on coloring set in BricxCC
    – Added source window status bar with file name and cursor location
    – Added “Goto Line” functionality to source window
    – Added “Find” functionality to source window

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s