Hi David Li,
I'm not sure which CW version and StarCore target you're using. I tried on a B4860 target and just copy paste this function into a small stationary project created via wizard and run on the SC3900 ISS flavour of the CW simulator. Furthermore, I'm assuming you have compiled your project with debug information ON.
Here's what i get:

As can be seen, the debugger works ok. It's able to show the local i variable and via the Debugger Shell I'm able to display its content or to modify it.
As a primary suggestion, try to create a small project without SmartDSP OS and see if that works in your case. It should :-)
If that is the case, then we investigate further.
Best regards,
Daniel