Quote:
Originally Posted by krudeboy51
One question, how do you run robot code as a "debug run?"
CAMERA INITIALIZATION:
Code:
HSLImage image; //Creates an image
AxisCamera &camera = AxisCamera::GetInstance();
camera.WriteResolution(AxisCamera::kResolution_320x240);
//camera.WriteCompression(20);
//camera.WriteBrightness(0);
|
To run a debug session, you right-click the project and select "Debug as" -> Open Debug Dialog instead of "Run as Kernel task". This brings up a dialog screen that will allow you to launch the application under the debugger. Before you launch, make sure you select the "Debug Options" tab and select "Automatically attach to spawned Kernel Tasks" or you won't be able to debug.
Once launched, you'll be asked to switch to the debug perspective. Say "yes". You should see your code in the main view in the center of the screen and a "Debug" view on the upper right hand of the Workbench. Just below that is a "Breakpoints" view. If you right click a line of code in the editor, it should pop up a dialog where you can toggle a breakpoint. This breakpoint will show up in the right-hand breakpoint view.
The Debug view then has a series of small icons along the top that allow you to single step or continue the code. Once you hit a breakpoint, the variables should then show up on the bottom right view "Variables" tab. step through the code and pay particular attention to variables like pointers getting modified. Variables that get modified should be color-coded red.
HTH,
Mike