Serial console/upload is not working

I got a new Nano BLE chip two days ago. I am trying to upload the sketch on the board and read IMU sensor data on serial console. The upload process and serial console are not stable. Sometimes the board is not all detect by the IDE, I cannot even find it in the device manager. When I press the reset button quickly twice the board goes into debug mode, the it is visible in the device manager and in the IDE. I could then upload the sketch. But once the sketch is uploaded the board is lost again. I cannot connect the board to serial console. Please help

Does the problem still occur if you upload the minimal sketch (File > New) to your Nano 33 BLE, or is the problem related to running a specific sketch on the board?

Once the sketch is uploaded have you tried re-selecting the port from the drop-down menu in the IDE?

In my very limited experience with this board in Windows 10 it seems to switch between 2 different COM ports. One port number for uploading and a different port number for the serial monitor. In some cases the IDE seems to handle the switch automatically while at other times it does not.

What operating system are you using? I have not been successful in getting the drivers to work in Windows 7.

@pert and @msdsmith Thank you for your replies.

@pert The problem was not specific to a particular sketch. I also had this problem with the bare minimum sketch. In general the upload process is unstable. I noticed whenever i press the reset button the board seems to change the port from ACM1 to ACM2 and so on. When I manually change the port again then it works.

@msdsmith: I also noticed the similar behaviour in ubuntu the board changes the port whenever the reset button is pressed. Then it is not able to detect the board unless the port is changed manually

Have the same problem with a Nano 33 BLE I received today. Pressing the reset button twice has now installed the driver correctly, previously it failed.

Have uploaded and run the "blink" sketch ok, although it changed the com port from 12 to 13 for some reason.

This is with Windows 7, Arduino IDE 1.8.10.