On Win10 (IDE 2.1.1) a simple (debug optimized) blink working fine.
The same hardware (MKR ZERO, USB cable, Atmel-ICE) on Win11 (other PC, IDE 2.1.1) when i press the Start Debug button, it's immediately followed up by a message that reads: "USB device not recognized" and "The last USB device you connected to this computer malfunctioned, and Windows does not recognize it.", the MKR board connection is lost.
The sketch upload working fine always...
Is there a win11 specific idea?
Well, It seems the error not Win11 specific.
On the same PC on a fresh Win10 partition the error is same. The MKR ZERO disconnecting when i press the debug button. The yellow row designator does not appear.
On the other pc (Win10) just sometimes disconnect the board, somtimes (it seems) working.
I tried several MKR ZERO boards. Each PC is 1-2 years old (has 16-32 GB RAM, 6-8 Intel/Ryzen cores).
It seems the debug features not too reliable yet...
The yellow row marker does not appear, I can't step row-by-row with the Step Over button.
The same hardware (and debug) is working fine on PlatformIO. My Arduino project is big (more then 50 ino-s + libraries), I don't have time/mood to move the project...
It is there. Unfortunately the color selected for it in the theme you are using has very poor contrast against the background so it is difficult to see. But if you look closely you will see the line is slightly lighter gray than the background.
If you would like a more distinctive visual marker, try this:
Select File > Preferences... from the Arduino IDE menus.
The "Preferences" dialog will open.
Select "Dark High Contrast" from the "Theme" menu.
Click the OK button.
You will now find the execution point is clearly marked with a brown box around the line in the editor.
I assumed that by "yellow row marker" you meant the line highlight (which is yellow in color in your VS Code screenshot). But from your new screenshot now I wonder if maybe you mean the outline on the breakpoint (which I see should be colored according to the debugIcon.breakpointCurrentStackframeForeground theme component)? I see that Arduino IDE doesn't have the latter regardless of which theme is selected.
That is slightly unfortunate, but certainly not the end of the world, since the line highlight provides the same information. Just try the different theme as I suggested in my previous reply and I think you'll see what I mean.
Something you need to understand is that Arduino IDE is not VS Code. The Eclipse Theia IDE framework it is built on is based on VS Code, so there are intercompatibilities and UI similarities, but they are two different applications so you will also notice some differences. So don't get sidetracked if the behavior is slightly different from one to the other.
That is not an error message. It is a warning. So long as the default thread context is what you intended then there is no problem and you can safely ignore it.
I notice that on the machine where it doesn't work, the sketch is under a path that contains "extended" characters (I don't know if that is the right term, but hopefully you understand what I mean), whereas the path on the machine where it does work contains only basic ASCII characters (C:\wolf\Blink_debug).
In theory, any path supported by the file system should work in any application, but unfortunately in practice I often find that such characters in a path is the cause of misbehavior.
In addition, I notice it is under a folder named "Google Drive". Less common, but I also sometimes see cases where problems are finally tracked down to being associated with the use of a file from a cloud storage service.
As an experiment, please try this:
Open the sketch you were having troubles with on the machine that was in the non-working state.
Select File > Save As... from the Arduino IDE menus.
Save the sketch to a path that doesn't have any potentially problematic characteristics.
For example:
C:\Blink_debug
Check to make sure you have Sketch > Optimize for Debugging selected in the Arduino IDE menus.
Select the appropriate board in Arduino IDE.
Select Sketch > Verify/Compile from the Arduino IDE menus.
I hate the black magic, took two weeks out of my life...
...but I got to know the platformIO
A proposal:
In the Debugging with the Arduino IDE 2 It would be worth noting that the Arduino board USB disconnect (during debug) is NOT error! Since it didn't work for me the debug AND a popup is continuously indicated it the USB disconnecting event, I went to wrong direction for a week...
I guessed as much, but I make it a policy to be very comprehensive in the instructions I post while providing support here on the forum. Even if that step is obvious to you, it might not be to some of the many people who may find this thread while researching for an answer to related questions in the years to come.
That is very odd. I did some experimentation to try to find a way to produce this misbehavior, but the debugger managed to behave correctly despite my best efforts. The breakpoints are stored in the metadata associated with the sketch, but the association between the metadata and sketch is based on the sketch path, so breakpoints set in the original sketch are simply not present in the new sketch I generate via a "Save As..." operation.
Did you have the Serial Monitor view open in the bottom panel of Arduino IDE?
I remember that in older versions of Arduino IDE 2.x, it did repeatedly show a notification if the port was lost (as is expected while debugging a board like MKR Zero since the program that generates the USB CDC serial port is not running while execution is halted). But recent versions of Arduino IDE don't have that behavior. I just tried it out with 2.1.1 and did not experience any such notifications.
I think it would be helpful to add a note about this to the tutorial. You are welcome to submit a contributions for this improvement if you like. The tutorial source content is hosted in a public GitHub repository so you can submit a pull request in order to most efficiently accomplish this.
The tutorial source is hosted here:
General information about contributing to projects on GitHub via pull requests here: