WildernessLabs / Meadow_Issues

Public repo for bugs and issues with Meadow
15 stars 0 forks source link

Debugging Meadow App in Windows 10 #196

Closed command0r closed 2 years ago

command0r commented 2 years ago

I'm familiarizing myself with some sample projects provided on the website (HelloPulsy particularly). The board is assembled and the app works as expected when deployed from VS. However, any attempts to run the same app in a debug mode fail. The app does reach a breakpoint (see below):

2022-01-05 In the console I see the following message:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

D:\Meadow\HelloPulsy\MeadowApplication\bin\Debug\netstandard2.1\App.dll (process 22308) exited with code -532462766.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

The output in the 'output' window is a bit different:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program '[22308] App.dll: Program Trace' has exited with code 0 (0x0).
The program '[22308] App.dll' has exited with code 3762504530 (0xe0434352).
Meadow StdOut: Initializing file system...
Meadow StdOut: File system initialized.
Meadow StdOut: Initialize hardware...

The environment is the following:

Also, it's not clear how debugging works. Is there an emulator for Meadow F7? Where can I find some documentation on debugging with Meadow board and VS? All I was able to find here http://developer.wildernesslabs.co/Meadow/Getting_Started/Hello_World is a quick mention to include the Mobile Development with .NET component when installing Visual Studio, so you can debug.

command0r commented 2 years ago

Another curious observation. I found out that you can initiate a remote debugging session on the device (Meadow F7) by using the 'meadow debug' CLI command. I assume all you need to do is to connect VS debugger to a remote process (127.0.0.1:4027). This doesn't work as well. Moreover, what I see in the console is the following:

Meadow StdInfo: Mono is disabled
Meadow StdInfo: Mono has been enabled. Restarting F7 Micro
Connecting to Meadow on COM4
Meadow StdInfo: Mono will not start. The following file is missing:Meadow.dll
Meadow StdInfo: Mono is enabled
Connecting to Meadow on COM4
Meadow StdInfo: Mono will not start. The following file is missing:Meadow.dll
Listening for Visual Studio to connect on 127.0.0.1:4024

Meadow.dll is missing. Where is it supposed to come from? Isn't it the part of the OS? I tried to wipe out the OS and the file system and redo everything from scratch - the result is the same.

Guys, I'm an experienced engineer with years of experience, but I don't have to guess how it all works. I can only imagine what it's like for the newbies. The absence of proper documentation is killing, as well as a dead silence in this repository.

t9mike commented 2 years ago

I have also just started on Hello World and running into issues.

With Visual Studio 2019, I can run the cycle color sample. And if I change to only two colors I see the change deployed. But eventually VS just crashes and restarts. VS reports that the issue is the extension. So the extension is crashing. Breakpoints are never hit.

So I tried running in VS 2022. There I see the same error you do and it does not even deploy.

This is with both versions of VS 100% up-to-date and brand new install of the Meadow extension.

bryancostanich commented 2 years ago

@adrianstevens @CartBlanche

CartBlanche commented 2 years ago

Hi @command0r and @t9mike, sorry about the late reply. Could you please specify exactly which versions of both VS and Meadow extension you are using. Also confirm which version of the Meadow board you have (V1 or V2) and I'll try to repro the issue on my Windows machine.

t9mike commented 2 years ago

I just realized an issue with my setup. I had updated VS2019 and 2022 with all MS updates. I installed Meadow extension on 2019. There I ran into the issue with deploy working but debugging not working and the extension eventually crashing. Not @command0r error.

So I switched over to 2022. But I did not install the 2022 extension. This is where I saw @command0r error. But it really did appear the extension was installed and my my sleepy brain did not notice lack of extension install. Are there shared bits between VS versions?

I just installed 2022 Meadow extension and ran. It eventually crashes. Issue may be ignoring the com port setting in some places. My board is at COM5:

image

But when I run I see mix of COM5 and COM3 in log:

1>------ Deploy started: Project: MeadowHelloWorld, Configuration: Debug Any CPU ------
1>[2/5/2022 8:30:37 AM] Connecting to Meadow on COM5
1>[2/5/2022 8:30:39 AM] Download version file for release 0.6.0.0
1>[2/5/2022 8:30:39 AM] Downloaded 285 bytes     
1>[2/5/2022 8:30:39 AM] OS version 0.6.0.0 is already installed.
1>[2/5/2022 8:30:39 AM] Meadow StdInfo: Mono is enabled
1>[2/5/2022 8:30:39 AM] Meadow StdInfo: Mono has been disabled. Restarting Meadow
1>[2/5/2022 8:30:43 AM] Connecting to Meadow on COM5
1>[2/5/2022 8:30:45 AM] Meadow StdInfo: Mono is disabled
1>[2/5/2022 8:30:45 AM] Meadow StdInfo: dev/     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  little0 [block]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  little0p0 [block]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  monostderr [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  monostdout [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  mtdblock0 [block]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  null [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  nxupd [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  pwm0 [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ramlog [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ttyACM0 [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ttyS0 [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ttyS1 [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ttyS2 [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  upd [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  urandom [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  usrsock [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo: meadow0/ 
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ./      
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  ../     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  App.exe [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  App.pdb [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  App.deps.json [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  netstandard.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  mscorlib.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Core.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Mono.Security.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Configuration.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Xml.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Security.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Numerics.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Data.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Transactions.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.EnterpriseServices.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Data.DataSetExtensions.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Drawing.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.IO.Compression.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.IO.Compression.FileSystem.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.ComponentModel.Composition.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Net.Http.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Runtime.Serialization.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.ServiceModel.Internals.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Web.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Runtime.Serialization.Formatters.Soap.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.ComponentModel.DataAnnotations.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Mono.Data.Sqlite.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Xml.Linq.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Meadow.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Meadow.Contracts.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Meadow.Units.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Meadow.F7.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Meadow.Foundation.dll [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Cache/  
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ./     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ../    
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Data/   
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ./     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ../    
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Documents/
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ./     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ../    
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  Temp/   
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ./     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   ../    
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  mscorlib.pdb [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.Core.pdb [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  System.pdb [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  dns.conf [file]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo: var/     
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:  mqueue/ 
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   Esp32Events [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   Esp32Requests [char]
1>[2/5/2022 8:30:45 AM] Meadow StdInfo:   IncomingEvents [char]
1>[2/5/2022 8:30:51 AM] Found App.deps.json (CRC: 3714983065)
1>[2/5/2022 8:30:51 AM] Found App.exe (CRC: 2912859181)
1>[2/5/2022 8:30:51 AM] Found App.pdb (CRC: 11066987)
1>[2/5/2022 8:30:51 AM] Found dns.conf (CRC: 2979744109)
1>[2/5/2022 8:30:51 AM] Found Meadow.Contracts.dll (CRC: 4194798930)
1>[2/5/2022 8:30:51 AM] Found Meadow.dll (CRC: 3146650874)
1>[2/5/2022 8:30:51 AM] Found Meadow.F7.dll (CRC: 2993405859)
1>[2/5/2022 8:30:51 AM] Found Meadow.Foundation.dll (CRC: 811527256)
1>[2/5/2022 8:30:51 AM] Found Meadow.Units.dll (CRC: 256229583)
1>[2/5/2022 8:30:51 AM] Found Mono.Data.Sqlite.dll (CRC: 1148685835)
1>[2/5/2022 8:30:51 AM] Found Mono.Security.dll (CRC: 579985191)
1>[2/5/2022 8:30:51 AM] Found mscorlib.dll (CRC: 2071317114)
1>[2/5/2022 8:30:51 AM] Found mscorlib.pdb (CRC: 3207151419)
1>[2/5/2022 8:30:51 AM] Found netstandard.dll (CRC: 1976981417)
1>[2/5/2022 8:30:51 AM] Found System.ComponentModel.Composition.dll (CRC: 1459926703)
1>[2/5/2022 8:30:51 AM] Found System.ComponentModel.DataAnnotations.dll (CRC: 3331136668)
1>[2/5/2022 8:30:51 AM] Found System.Configuration.dll (CRC: 3826321134)
1>[2/5/2022 8:30:51 AM] Found System.Core.dll (CRC: 3758733907)
1>[2/5/2022 8:30:51 AM] Found System.Core.pdb (CRC: 3392990247)
1>[2/5/2022 8:30:51 AM] Found System.Data.DataSetExtensions.dll (CRC: 3231756906)
1>[2/5/2022 8:30:51 AM] Found System.Data.dll (CRC: 2601918033)
1>[2/5/2022 8:30:51 AM] Found System.dll (CRC: 160124469)
1>[2/5/2022 8:30:51 AM] Found System.Drawing.dll (CRC: 5739232)
1>[2/5/2022 8:30:51 AM] Found System.EnterpriseServices.dll (CRC: 4068728482)
1>[2/5/2022 8:30:51 AM] Found System.IO.Compression.dll (CRC: 1111352119)
1>[2/5/2022 8:30:51 AM] Found System.IO.Compression.FileSystem.dll (CRC: 4215961484)
1>[2/5/2022 8:30:51 AM] Found System.Net.Http.dll (CRC: 3164676281)
1>[2/5/2022 8:30:51 AM] Found System.Numerics.dll (CRC: 2658998174)
1>[2/5/2022 8:30:51 AM] Found System.pdb (CRC: 1224571606)
1>[2/5/2022 8:30:51 AM] Found System.Runtime.Serialization.dll (CRC: 1793119296)
1>[2/5/2022 8:30:51 AM] Found System.Runtime.Serialization.Formatters.Soap.dll (CRC: 3303315338)
1>[2/5/2022 8:30:51 AM] Found System.Security.dll (CRC: 2753958064)
1>[2/5/2022 8:30:51 AM] Found System.ServiceModel.Internals.dll (CRC: 1835641117)
1>[2/5/2022 8:30:51 AM] Found System.Transactions.dll (CRC: 2359298550)
1>[2/5/2022 8:30:51 AM] Found System.Web.dll (CRC: 3902090432)
1>[2/5/2022 8:30:51 AM] Found System.Xml.dll (CRC: 2548042852)
1>[2/5/2022 8:30:51 AM] Found System.Xml.Linq.dll (CRC: 2944548988)
1>[2/5/2022 8:30:51 AM] Meadow StdInfo: Meadow successfully deleted 'dns.conf'
1>[2/5/2022 8:30:51 AM] Removing file: dns.conf  
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): App.pdb
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): App.deps.json
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): App.exe
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): netstandard.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): mscorlib.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): mscorlib.pdb
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Core.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Core.pdb
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.pdb
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Mono.Security.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Configuration.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Xml.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Security.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Numerics.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Data.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Transactions.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.EnterpriseServices.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Data.DataSetExtensions.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Drawing.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.IO.Compression.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.IO.Compression.FileSystem.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.ComponentModel.Composition.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Net.Http.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Runtime.Serialization.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.ServiceModel.Internals.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Web.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Runtime.Serialization.Formatters.Soap.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.ComponentModel.DataAnnotations.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Mono.Data.Sqlite.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): System.Xml.Linq.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Meadow.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Meadow.Contracts.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Meadow.Units.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Meadow.F7.dll
1>[2/5/2022 8:30:51 AM] Skipping file (hash match): Meadow.Foundation.dll
1>[2/5/2022 8:30:51 AM] App.dll deploy complete  
1>[2/5/2022 8:30:51 AM] Meadow StdInfo: Mono is disabled
1>[2/5/2022 8:30:51 AM] Meadow StdInfo: Mono has been enabled. Restarting F7 Micro
1>[2/5/2022 8:30:53 AM] Connecting to Meadow on COM5
1>[2/5/2022 8:30:54 AM] Connecting to Meadow on COM3
1>[2/5/2022 8:30:56 AM] Meadow StdInfo: Meadow successfully started MONO
1>[2/5/2022 8:31:01 AM] Meadow StdOut: Initializing file system...
1>
1>[2/5/2022 8:31:02 AM] Meadow StdOut: File system initialized.
1>
1>[2/5/2022 8:31:02 AM] Meadow StdOut: Initialize hardware...
1>
1>[2/5/2022 8:31:03 AM] Meadow StdOut: Cycle colors...
1>

Eventually I then see another COM3 reference (board is on COM5 per above):

image

image

When I click OK, VS is unresponsive and crashes a few seconds later.

VS2022 About:

Microsoft Visual Studio Enterprise 2022
Version 17.0.5
VisualStudio.17.Release/17.0.5+32112.339
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Enterprise

ASP.NET and Web Tools 2019   17.0.795.42246
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   17.0.795.42246
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   17.0.795.42246
Azure App Service Tools v3.0.0

C# Tools   4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Command2 Extension   1.0
Command2 Visual Stuido Extension Detailed Info

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter   17.0.21293.2
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Extensibility Message Bus   1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Mono Debugging for Visual Studio   17.0.11 (54f19d2)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   6.0.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Python - Profiling support   17.0.21293.2
Profiling support for Python projects.

Python with Pylance   17.0.21293.2
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

TypeScript Tools   17.0.1001.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.0.0-beta.21522.2+6d626ff0752a77d339f609b4d361787dc9ca93a5
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Foo   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   17.0.0.343 (d17-0@fb07a17)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.0.0.183 (remotes/origin/d17-0@a351f0f1f)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   17.0.17 (9e779b0)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   12.1.0.5 (d17-0/6b0e6b2)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: c633fe9
    Java.Interop: xamarin/java.interop/d17-0@febb1367
    ProGuard: Guardsquare/proguard/v7.0.1@912d149
    SQLite: xamarin/sqlite/3.36.0@a575761
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-0@a5194e9

Xamarin.iOS and Xamarin.Mac SDK   15.4.0.0 (8fc41ae82)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

image

command0r commented 2 years ago

Hi @CartBlanche, here's the data you're looking for: VS 2022, v17.04

Extensions:

Board: V2

t9mike commented 2 years ago

I have V2 board.

command0r commented 2 years ago

@adrianstevens, @CartBlanche, @bryancostanich, do you guys have any insights into this issue? I see it wasn't even labelled. I don't mind promptly helping you with any information you may request from my end, but I'd expect a reply a bit more often than once in a month.

bryancostanich commented 2 years ago

@command0r sorry about the tardiness of the reply. we've been head's down on trying to get b6.2 out the door which has a pile of fixes around this workflow, and so we don't always get to the issues as quickly as we should.

that said, we have a slack server and if you pop into the #support channel, you'll find that you can usually get realtime support pretty quickly. so if you run into things needing urgent attention, I 100% recommend that over the meadow_issues repo.

CartBlanche commented 2 years ago

Hi @command0r, @t9mike Nothing jumps out about why this issue is occurring. Are you both selecting the associated COM port from the COM Meadow Device Explorer dialog, before debugging?

From the docs on the Hello World page:

Go to View > Other Windows > Meadow (or Ctrl+Shift+M) to open Meadow Device Explorer and select your device.

If the above doesn't work, what time-zones are you both in? Maybe I could organise a Zoom call or similar with each so I can see what steps you are following and see the issue in action?

t9mike commented 2 years ago

In https://github.com/WildernessLabs/Meadow_Issues/issues/196#issuecomment-1030637068 I have screen shot showing COM5 is selected (this is my port). But in places the deploy prints COM3 to screen:

1>[2/5/2022 8:30:53 AM] Connecting to Meadow on COM5 1>[2/5/2022 8:30:54 AM] Connecting to Meadow on COM3 <-- WHY???

image

No hard coded COM3 lurking in code? That was my guess.

I am in USA Central time zone.

CartBlanche commented 2 years ago

@t9mike COM ports aren't/shouldn't be hard coded. Do you have more than one device plugged in, hence why 2 COM ports are found? The only other thing I can think of it that somehow the device is moving from one COM port to another, maybe the OS is reassigning it.

I'm on UK/GMT time. Are you around in 1hour 15mins? That would make it by 16:30 so about 10:30 your time (or 11:30 DC time)?

t9mike commented 2 years ago

I just tried another test, this time using my Dell Docking Station – USB 3.0 to connect. It worked (I can debug, no crash) and I do not see COM3 ever listed in debug output! I do see device manager refresh several times during the deploy process.

When I switched back to problem config -- which is using Dell DA20 USB Type-C to HDMI/USB Type-A adapter, I see the problem reoccur.

The refreshing I see in device manager during deploy is very odd. I see it in both cases. Do you see that on Windows on your end?

I'm happy to debug the issue with the problem adapter. I will experiment with some other USB adapters. My work PC is Dell Mobile Precision Workstation 5760. Darn thing is USB-C only.

CartBlanche commented 2 years ago

@t9mike Thanks for taking the time to investigate further and identifying what could potentially be a USB-C issue (??!!, very odd). I don't believe we are doing anything fancy with USB connector types. If you do find out anything, we'd love to know about it, so we can share it with others and maybe even add a note in the documentation. I don't have a USB-C port on either of my laptops (too old) to test this, but wonder if @bryancostanich or @adrianstevens do?

command0r commented 2 years ago

Hi @CartBlanche, I don't have any other devices plugged in. Visual Studio 2022 determines the port as COM4, which is in line with what I can see in Device Manager. After the VS update to the latest patch (17.0.4), it has started behaving even weirder. Now, when I run the solution it ends up displaying the following error message:

2022-02-10 after which VS crashes and restarts.

If anything, I'm available for a brief call over Zoom.

CartBlanche commented 2 years ago

@command0r I'm just updating my Windows VS2022 setup to 17.0.6 and I'll retest the latest Meadow extension and get back to you.

CartBlanche commented 2 years ago

@command0r I've managed to repro that dialog. As we've not changed anything in our extension and only VS2022 update has happened, I suspect that the VS team may have broken something in debugging, but I need to investigate further.

CartBlanche commented 2 years ago

@command0r I was able to work around this issue by uninstalling the Meadow extension, then a manually doing flash os on my v2 board. I think reinstalled the 0.18.7 Meadow extension. After that that everything worked in both VS2019 and VS2022 for me and has continued to work.

command0r commented 2 years ago

@CartBlanche, I just applied the workaround you suggested and can confirm it worked for me. It makes me puzzled what was wrong the first time, but the app finally hits the breakpoint and deploys to the F7 board.

CartBlanche commented 2 years ago

@command0r The only thing that occurs to me is that the original flash os didn't complete successfully and left the device in an unstable state, which then caused the extension to hang during debugging. We'll have to see if we are getting any messages back from the device to VS itself to make this a more graceful experience.

CartBlanche commented 2 years ago

Resolved. Workout provided.