Does the client you modified have tests? If yes, run all the tests. If the tests have any good coverage, there should be some failures. That will help you isolate the problem.
Unfortunately, many blockchains are shortchanging the development process by not building a full set of tests with high code coverage. In that case, manual debugging is your only option.
Yes I deleted premine, genesis block generation code at main.cpp. Then the client does not sync with current chain.
After I restore the main.cpp file to original, client sync well.
So this means, I should not delete any lines from main.cpp?
What is standard of existing client recognize new source-revised client as different with them and not to accept them?