Difference between revisions of "Programming Howto:Programmatically wait for the Debugger in a BCI2000 Module"

From BCI2000 Wiki
Jump to: navigation, search
Line 1: Line 1:
 
In the VeryNiceFilter constructor, add a line with a SuggestDebugging statement, and rebuild
 
In the VeryNiceFilter constructor, add a line with a SuggestDebugging statement, and rebuild
  
[[File:suggest_debugging_1.png]]
+
[[File:suggest_debugging_1.png|center]]
  
 
Double-click the VeryNiceSignalProcessing batch file you created earlier
 
Double-click the VeryNiceSignalProcessing batch file you created earlier
  
[[File:suggest_debugging_2.png]]
+
[[File:suggest_debugging_2.png|center]]
  
 
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
 
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
  
[[File:suggest_debugging_3.png]]
+
[[File:suggest_debugging_3.png|center]]
  
 
In the VisualStudio IDE, choose "Attach to Process..." from the "Debug" menu
 
In the VisualStudio IDE, choose "Attach to Process..." from the "Debug" menu
  
[[File:suggest_debugging_4.png]]
+
[[File:suggest_debugging_4.png|center]]
  
 
Select the "Very Nice Signal Processing" process, click "Attach", and finally dismiss the SuggestDebugging dialog box by clicking "yes"
 
Select the "Very Nice Signal Processing" process, click "Attach", and finally dismiss the SuggestDebugging dialog box by clicking "yes"
  
[[File:suggest_debugging_5.png]]
+
[[File:suggest_debugging_5.png|center]]
  
 
In the call stack, your own code will appear some frames below the top
 
In the call stack, your own code will appear some frames below the top
  
[[File:suggest_debugging_6.png]]
+
[[File:suggest_debugging_6.png|center]]
  
 
Double-clicking your own code's frame will take you to the location of the SuggestDebugging statement
 
Double-clicking your own code's frame will take you to the location of the SuggestDebugging statement
  
[[File:suggest_debugging_7.png]]
+
[[File:suggest_debugging_7.png|center]]
  
 
You may now set a breakpoint and choose "Continue" from the "Debug" menu
 
You may now set a breakpoint and choose "Continue" from the "Debug" menu
  
[[File:suggest_debugging_8.png]]
+
[[File:suggest_debugging_8.png|center]]
  
 
As before, the debugger will stop when the breakpoint is hit
 
As before, the debugger will stop when the breakpoint is hit
  
[[File:suggest_debugging_9.png]]
+
[[File:suggest_debugging_9.png|center]]
  
 
==Next step==
 
==Next step==
As a next step, learn how to [[Programming Howto:Deploy a Release version of a BCI2000 module|Deploy a Release version of a BCI2000 Module]].
+
As a next step, learn how to [[Programming Howto:Deploy a Release version of a BCI2000 module|deploy a release version of a BCI2000 module]].
  
 
==See also==
 
==See also==

Revision as of 13:45, 16 August 2018

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