For example, first open your own program, open the serial port com3, and then open the serial port assistant to set the same serial number. Generally, it will prompt something like "serial port has been opened" ... I don't remember.
If you have to debug with serial assistant, please make sure that your computer has two serial ports, set your own program and serial assistant to different serial numbers, and then connect the output and input, input and output of these two serial ports on hardware, and then you can debug.
The more troublesome ones can be debugged with two computers.