Hi, I try to debug this plugin, but I have always have this line hit:
// ----------------------------------------------------------------------------
void CodeCompletion::OnAttach()
// ----------------------------------------------------------------------------
{
AppVersion appVersion;
appVersion.m_AppName = "clangd_client";
// Set current plugin version
PluginInfo* pInfo = (PluginInfo*)(Manager::Get()->GetPluginManager()->GetPluginInfo(this));
pInfo->version = appVersion.GetVersion();
// ccmanager's config obtained from Menu=>Settings=>Editor=>Code Completion (sub panel)
// Get the CB config item that enables CodeCompletion
ConfigManager* ccmcfg = Manager::Get()->GetConfigManager(_T("ccmanager"));
m_CodeCompletionEnabled = ccmcfg->ReadBool(_T("/code_completion"), false);
if (not m_CodeCompletionEnabled)
{
pInfo->version = pInfo->version.BeforeFirst(' ') + " Inactive";
return;
}
I have always get the m_CodeCompletionEnabled is false, and I have no idea how to enable it.
What I did is like below:
1, I have build a normal cbp:
D:\code\cb\cb_sf_git\cccrash2019\src\CodeBlocks_wx31_64.cbp
I just build it.
2, I just open the downloaded clangd_client project, and I changed some build options:
In the build option custom variables, I set the variable:
TARGET_DEVEL_DIRas the value:
D:\code\cb\cb_sf_git\cccrash2019, which is the root folder of my local C::B git/svn
3, I changed the output filename as:
$(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\plugins\clangd_client.dll
which means the build target(clangd_client.dll) will be put in the same folder as the other core plugins.
4, I set the Execution working dir as:
$(TARGET_DEVEL_DIR)\src\devel31_64
Which is the folder where codeblocks.exe locates.
5, I change the post build script as:
cmd /c if not exist $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks mkdir $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks
zip -jq9 $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/manifest.xml src/resources/*.xrc
zip -r9 $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/images > nul
This means I make a clangd_client.zip, and put it in the destination devel31_64 folder.