Closed vernon2gh closed 3 years ago
can you share your settings? Especially the command line parameters if you changed them. The default parameter shall rebuild the database each time after you changed the code.
"scope4code.databasePath": "${workspaceRoot}/",
"scope4code.engineCommands": {
"config_index": {
"cscope": {
"linux": 0
}
},
"config": [
{
"find_cmd": "find ${src_path} -type f -name *.c -o -type f -name *.h -o -type f -name *.cpp -o -type f -name *.cc -o -type f -name *.mm",
// "database_cmd": "cscope -b -q -k -f cscope.out",
"database_cmd": "make ARCH=x86 cscope",
"find_all_ref": "cscope -q -k -f cscope.out -L0 ${text}",
"find_define": "cscope -q -k -f cscope.out -L1 ${text}",
"find_callee": "cscope -q -k -f cscope.out -L2 ${text}",
"find_caller": "cscope -q -k -f cscope.out -L3 ${text}",
"find_text": "cscope -q -k -f cscope.out -L4 ${text}"
}
]
},
hmm, this is interesting. Can you try to put the absolute path of cscope.out in the command? I'm suspecting the command might run in a different folder where cscope.out does not exist. If an absolute path works then I would suggest to change command to: -f ${database_path}/cscope.out and configure database path in the setting.
Sure enough, it is an absolute path problem. Modify it to -f ${database_path}/cscope.out
and it will succeed. Thank you very much.
I generated cscope database, can normally jump function, and then modify the source code, save, can not jump function phenomenon, has been in a circle