Some users of the extension may only wish to use the debugger features and don't want to be bothered with any error notifications from the language server.
moving request out of closed issue #755
@bobbrow, actually, I really want to disable debugger feature of cpp extension. VS code should be a code editor rather than debugger. We have more professional IDE or debug tool. I wonder that why a code editor adding a debugger function. Till now, the intelliSense is not full functionality.
The debugger feature doesn't get in the way of the editor for you, does it? There's really nothing to disable if you don't try to use it. The language server features, on the other hand, will consume CPU and memory resources by simply opening a file.
@vscpp Can you explain what you mean by:
I really want to disable debugger feature of cpp extension.
What specifically do you want disabled? Like @bobbrow mentioned, unless you configure for debugging, the debug extension doesn't do any work at all.
@bobbrow, @pieandcakes, I using VS code for C coding, searching and reading, and I debug my code by other tools. It means vs code is a source editor like Source Insight. I hope CPP extension have more function like Source Insight.
But currently, seems MSFT take more effort on Debugger feature, not basic code editor improving. If you use VS code for C coding that you will find there is a big gap with Source Insight.
e.g. for a data struct, if you type . or -> , there is no correct struct member display.
@vscpp, semantic auto-complete is something I am working on currently (tracked by issue #13). We are a small team and appreciate your patience as we try to simultaneously address the incoming issues reported here.
@bobbrow Thank you for creating this issue -- in the meantime, what are my options for preventing intellisense from spawning 10 threads and using 100% of the CPU power for 15 minutes every time I open a C++ project in vscode (the end result for me being a whole lots of bogus red squiggles) without disabling the debugger as well?
Until this issue is addressed the way to consume the least amount of power is to use the following settings:
"C_Cpp.intelliSenseEngine": "Tag Parser"
{
"name": "whatever",
"includePath": [],
"defines": [],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "",
"path": []
},
"compilerPath": ""
}
By emptying the browse.path array, the extension should stop indexing your project folder which will effectively neutralize the language service features, however the side effect is that you will get squiggles on most, if not all, of your #include lines in your files.
What I currently do is to manually patch the source. Seems to work without config file.
Go to $extension_root/out/src/main.js and comment out the following lines
LanguageServer.activate(delayedCommandsToExecute);
return LanguageServer.deactivate();
+1. This would also allow users to use other C++ language servers without sacrificing the debugger.
+1. This makes it much easier to use vscode + clangd.
As long as multi-translation unit intellisense is not a near-future item, this should be high priority. It is very unfortunate that I have to manually go in and edit out.js again after every update is released in order to have cquery run the show and cpptools as a debugger extension only
@dprandle The typescript code that would implement this disabling is open source, so we could accept a pull request to add some disableLanguageServer option. I understand why this is important to you and others, but the number of requests haven't been particularly high.
+1.
Fixed with 0.18.0.
Most helpful comment
The debugger feature doesn't get in the way of the editor for you, does it? There's really nothing to disable if you don't try to use it. The language server features, on the other hand, will consume CPU and memory resources by simply opening a file.