I have some basic project code with setup() and loop(), nothing complicated.
Verification and upload works to nano 33 iot on win11, but debugging crashes to
"Error: unable to find CMSIS-DAP device".
Bare new install with device+lsm6ds3+mouse installs. Mouse device is disabled for usb port usage issues clarity.
Fresh install of the ide should work out of the box always?
Because some people own debug probes and would like to use the debugger.
It does indeed support being used with the Arduino IDE Sketch Debugger. You only need to connect it to your computer through a debug probe.
Maybe you are asking why the board doesn't have a built-in debug probe? The answer is that this would require the addition of more components to the board, and thus would increase the price of the board, and might also increase the power consumption. It is more cost effective to purchase a single dedicated debug probe, and use that probe with all your boards than it is to pay for the same components to be added to multiple boards.
ok. I would assume the debug functionality is basically already present in the chip without major modifications. another option is to use an emulator to simulate the arduino device. also there should not be any issue to push multiple usb devices through the usb interface, to have the debug run in the other. only possibly using a bit more of the arduino internal resources for the debug purposes. I currently have two arduino usb devices showing at same time in the arduino ide because of the mouse emulation.
another question is that why does the whole computer need to be restarted (not only arduino ide and/or the arduino device restarted) when the arduino device crashes for random reasons.
upload fails after such hard arduino crash. actually reboot did not help. cant find the device on the usb port even if the ide sees the device. on both ports it fails. because mouse mode is active.
edit: double pushing the arduino device reset button did fix the upload issue.
additional notes: if you resize the window during program start-up then the window will stay broken.
I don't know about that. In over a decade of working with Arduino daily, very often intentionally trying to break things, there have only been a few occasions when I've encountered a problem that required restarting the computer. And the last time was years ago, using an older version of Arduino IDE and Windows.
So this definitely isn't something at all common or expected.
So it wasn't required after all.
The tricky thing about the boards with native USB capability like Nano 33 IoT is the USB code that creates the CDC serial port is running on the same microcontroller as your sketch. This means your sketch code can break the USB code, or stop it from running. This might be caused by a bug in the code (e.g., a divide by zero) or be an expected result of the program behavior (e.g., putting the microcontroller to sleep to save power). When that happens, the board no longer produces a serial port.
This can be unexpected to those who previously mainly worked with the boards like Uno and Mega with a dedicated USB chip that can never be affected by the sketch code.
As you discovered, you can always recover the board from that state by performing a double reset. This puts the board into a "boot mode" where it once again produces a serial port regardless of what sketch program was loaded.
However, note that if the "no port" behavior was a result of the sketch program and you upload the same problematic sketch program to the board again, it is likely to happen just as it did before. In the case where that is unexpected, you will need to analyze the sketch code to find the cause of the problem. If you can't find the problem, you are always welcome to share the code here on the forum and the forum helpers may be able to spot the culprit.
The Arduino IDE developers are tracking the bug here: