Visual Studio - TinyCLR

I was busy debugging code. The on the next iteration of build, the deployment hung. Here is the last few dozen lines from the output window:

Assembly: VersaSerial (1.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Devices.I2c (2.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Devices.Display (2.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Devices.Gpio (2.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6 (2.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Devices.Storage (2.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Devices.Pwm (2.0.0.0) Attaching deployed file.

Assembly: VersaLocalCmds (1.0.0.0) Attaching deployed file.

Assembly: GHIElectronics.TinyCLR.Update (2.0.0.0) Attaching deployed file.

Assembly: VersaDataDefs (1.0.0.0) Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Native.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Drawing.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Storage.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaStat.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaHelpers.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Gpio.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.I2c.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Pwm.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Can.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.IO.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Networking.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Spi.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Uart.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Network.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.UsbHost.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaDataDefs.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaCAN.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaSerial.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Modbus.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaComponents.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Devices.Display.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaLocalCmds.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaMaintenance.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaCalibration.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaSystemSettings.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\GHIElectronics.TinyCLR.Update.dll’, Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\VersaAdvanced.dll’, Symbols loaded.
‘GHIElectronics.TinyCLR.VisualStudio.ProjectSystem.dll’ (Managed): Loaded ‘C:\Users\tomr\source\repos\Titan Versa\Titan Versa\TitanVersa\bin\Debug\pe…\TitanVersa.exe’, Symbols loaded.

At this point it hung.

I have tried:

  1. re boot the module
  2. erase and reload firmware
  3. restarted Visual Studio
  4. reduced the size of the deployment

and combinations of the above. Still the same result.

Any suggestions ???

You can always hold ldr and go to TinyCLR config and eraser all.

You call also hold app to keep the system from running your app and redeploy.

Erase all, reload firmware didn’t help. Holding APP and deploy allowed the deployment but of course did not allow debugging. Even without holding APP the actual deployment did occur, but did not allow Visual Studio to debug. The newly deployed software will run normally on system reset. However, very difficult to debug.

I can deploy and debug a different application

1 Like

You answer the question there. We need to know what caused this. Please try to narrow it down to the code that is causing the system to crash.

OK. I was hoping you guys knew what to do. When the deploy/debug worked, right after all the loading (where it hangs now) the following line was on the output window:

The thread ‘’ (0x2) has exited with code 0 (0x0).
and debugging continued.

When it hangs, if I reset, I get:

The debugger engine failed to receive any debug events from the debugging target

And VS goes out of run/debug.

Something is craving the entire system. We just need to know what it is and we will take care of the rest.

What do you mean: craving ?

Causing… Gotta love automatic spell correctors

Did you change any of the debug options? I have never seen “just my code” before. Undo any changes to debug and see if that helps/

did not change any VS configuration. Actually, I only made several minor changes to code. I get 'Just My code"
on the application that is still working

Re - Just My Code
You can find this dialog in Tools | Options. The dialog shows my options when I’m doing tinyclr.

1 Like

I’m not sure what the cause is. I have, however, seen it before. And reducing the size of the code seemed to help. But probably just a coincidence.
I finally just copied all source to a backup and rebuilt the solution from scratch. It runs now
(???)

Gremlins often appear in software development.

Having this issue again this morning. Noticed that I had a lot of breakpoints defined. Deleted ALL, and it seems to have fixed the problem.