Hi,
I have found the root cuase by following steps:
First of all, starting codeblocks in termininal. Many logs which print by codeblocks are showing in the termininal when debugging.
Looking at the logs and finding that:
Switching layout to "GDB/CDB debugger:Default"
warning: GDB: Failed to set controlling terminal: Operation not permitted
/home/mine/work/ffmpeg/ffmpeg-2.1_CB/tmp/ffplay_g: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory
Switching layout to "Code::Blocks default"
This is the key point that some .so files cann't be found by gdb.
Then executing export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/work/ffmpeg/ffmpeg-2.1_CB/tmp and starting codeblock again. It works fine. Then I can debug ffplay_g.
When using gdb commond in terminal, the path has been exported before starting gdb commond. So gdb works fine.
There are few logs about codeblocks. If all the logs in terminal can been seen easily, I should spend little of time to solve the problem. Where can I find the logs except in terminal?