Difference between revisions of "Programming Howto:Attach the Debugger to a BCI2000 Module"

From BCI2000 Wiki
Jump to: navigation, search
Line 26: Line 26:
 
From the process list, choose "Very Nice Signal Processing", and click "Attach".
 
From the process list, choose "Very Nice Signal Processing", and click "Attach".
  
==Verify that execution stops at the breakpoint==
 
 
[[File:debug_6.png|center]]
 
[[File:debug_6.png|center]]
  
 +
==Verify that execution stops at the breakpoint==
 
In the Operator window, click "Set Config" ...
 
In the Operator window, click "Set Config" ...
  

Revision as of 15:12, 16 August 2018

Back

To this howto's overview page.

Create a batch file to start up your configuration

Duplicate a SignalGenerator batch file from the BCI2000 batch directory. Which one you choose may depend on the task your module is going to be used with.

Debug 1.png

Rename the duplicated file to contain "VeryNiceSignalProcessing" in its name.

Debug 2.png

Edit the batch file by adding --EvaluateTiming=0 to the SignalGenerator line, and by replacing the signal processing module's name with "VeryNiceSignalProcessing".

Debug 3.png

Double-click the batch file to start up BCI2000.

Debug 4.png

Attach the debugger

In the VisualStudio IDE, set a breakpoint in VeryNiceFilter::StartRun(), and choose "Attach to Process..." from the "Debug" menu.

Debug 5.png

From the process list, choose "Very Nice Signal Processing", and click "Attach".

Debug 6.png

Verify that execution stops at the breakpoint

In the Operator window, click "Set Config" ...

Debug 7.png

... and "Start", which will execute VeryNiceFilter::StartRun() ...

Debug 8.png

and cause the debugger to stop execution at the breakpoint you set earlier.

Debug 9.png

Next step

As a next step, learn how to programmatically wait for the debugger in a BCI2000 module.

See also

Programming Howto:Building and Customizing BCI2000