Programming Howto:Programmatically wait for the Debugger in a BCI2000 Module

From BCI2000 Wiki
Revision as of 13:45, 16 August 2018 by Mellinger (talk | contribs)
Jump to: navigation, search

In the VeryNiceFilter constructor, add a line with a SuggestDebugging statement, and rebuild

Suggest debugging 1.png

Double-click the VeryNiceSignalProcessing batch file you created earlier

Suggest debugging 2.png

A SuggestDebugging dialog box will pop up, and stay in the front -- you may move it out of the way, but otherwise leave it alone

Suggest debugging 3.png

In the VisualStudio IDE, choose "Attach to Process..." from the "Debug" menu

Suggest debugging 4.png

Select the "Very Nice Signal Processing" process, click "Attach", and finally dismiss the SuggestDebugging dialog box by clicking "yes"

Suggest debugging 5.png

In the call stack, your own code will appear some frames below the top

Suggest debugging 6.png

Double-clicking your own code's frame will take you to the location of the SuggestDebugging statement

Suggest debugging 7.png

You may now set a breakpoint and choose "Continue" from the "Debug" menu

Suggest debugging 8.png

As before, the debugger will stop when the breakpoint is hit

Suggest debugging 9.png

Next step

As a next step, learn how to deploy a release version of a BCI2000 module.

See also

Programming Howto:Building and Customizing BCI2000