[quote]Do not forget that the free ebook has plenty of examples
I looked at the ebook example in section “USB Debugging with Virtual COM Channel” and am confused. The code there appears to be the same as the code in section “CDC - Virtual Serial”. The first thing the code does is check if USB is the current debugger and throws an exception if it is.
So I commented out that line and changed the code as follows:
// I commented out this line
//USBC_CDC cdc = USBClientController.StandardDevices.StartCDC();
//and replace it with this line:
USBC_CDC cdc = USBClientController.StandardDevices.StartCDC_WithDebugging();
I deployed the code in the Visual C# 2010 Express debugger and it ran (i.e. TeraTerm printed “Hello World” once every second. So far so good
I stopped the debugger using the “Debug|Stop Debugging” menu item in Visual C# but the code appeared to continue to run (i.e. TeraTerm continued to print “Hello World” every second). So I closed Visual C# and unplugged the Cobra board USB. When I plugged the board back in it ran the code again without starting Visual C#. So I pressed the Reset button on the board and it stopped running the code.
I restarted Visual C#, rebuilt the project and tried to run it again. Visual C# attempted to deploy the assemblies but after a few seconds it displayed an error dialog that indicated that “There were deployment errors. Continue?”. If I continue I get a second error dialog that indicates “An exception occurred while trying to launch the debugger: Object reference not set to an instance of an object.”.
So now I cannot deploy anything more to the Cobra board :’(
Do you have any suggestions on how I can recover from this situation?