mitaki28 / vscode-clang

Completion and Diagnostic for C/C++/Objective-C using Clang
MIT License
128 stars 24 forks source link

How to debug the extension? #19

Closed jjgod closed 7 years ago

jjgod commented 8 years ago

Hi,

I have VSCode 1.2 installed and trying to use this extension with an internal project. When I opened any C++ files (.cpp), there is no diagnostics information, nor does it autocompletes when I typed any triggering char (. for example).

Is there a good way to me to find out why the extension isn't working for me?

I did set up some clang.cxxflags in my workspace settings.json, it goes like this:

{
    "clang.cxxflags": [
        "-std=c++11",
        "-I${workspaceRoot}",
        "-fconstant-cfstrings",
    ]
}

But I don't get any help from that, removing it doesn't help either.

I cloned the repository and try to debug with F5, but it shows this error:

screen shot 2016-06-07 at 7 12 10 pm

I have node.js installed via homebrew, is there anything I'm missing?

jjgod commented 8 years ago

npm install seems to solve the outDir problem. But I still appreciate help to debug why this is not working for me.

jjgod commented 8 years ago

Looks like I'm constantly hitting write EPIPE:

screen shot 2016-06-07 at 7 36 53 pm

db4 commented 8 years ago

Have you succeeded in debugging this? Looks like I have the same issue: the extension silently doesn't work. And the project looks like abandoned: no new commits in last 3 months, no reaction from the author to bug reports...

jjgod commented 8 years ago

@db4 I don't have much success still, haven't tried much since.

tilman22 commented 7 years ago

I'm always using the following setting: "C_Cpp.autocomplete": "Disabled",

If completion does not work, you can try out manually:

Remark: The extension uses -Xclang -code-completion-at=<stdin>:41:9 instead of -Xclang -code-completion-at=-:41:9. <stdin> does not work for me on the command line. I'm using my own version of the extension, so I'm not sure if <stdin> is working, too.

jjgod commented 7 years ago

Thanks, that suggestion works well for me.