1. A method for debugging firmware/software by generating trace data, the method comprising the following steps: running a debug tool program in a main control system, running a debug engine in a power-on stage in a test system to configure an area of a first memory used for temporary storage, and recording a load address and a branch instruction execution record set into the area for temporary storage, wherein the load address is an address of a module, which is loaded in the first memory, of an embedded system, and the branch instruction execution record set comprises a plurality of branch instruction execution records that record addresses before and after a branch instruction is executed; sending, by the main control system, a debug instruction to the test system, to collect the load address and the branch instruction execution record set in the area for temporary storage of the test system and store the load address and the branch instruction execution record set in a second memory; accessing, by an analyzer of the main control system, the load address, the branch instruction execution record set, and a program debug symbol table in the second memory, wherein the program debug symbol table is generated when source program code of the embedded system is compiled; and finding, by the analyzer, an original source file, a function name, and line numbers of executed codes from the program debug symbol table according to the load address and the branch instruction execution record set to generate an analysis report, wherein the analysis report comprises a program execution path and a program code coverage.