3 ms·
I have been trying to use VSCode for languages besides JS, like C# and C++, but I've been getting stuck. There's a big opportunity here for someone to write up
by redwards510 10y ago
I have been trying to use VSCode for languages besides JS, like C# and C++, but I've been getting stuck. There's a big opportunity here for someone to write up some brief tutorials on how to use VSCode for other languages. So far, the instructions are basically "Get VSCode. Enable the C++ extension. Enjoy!"
That's not enough, especially when it comes to setting up debugging, which c'mon, everyone needs. The json config file for C++ debugging has zero documentation. Until there is some more documentation besides the extensions readme, it's going to be a little challenging for new users to pick this up and have a delightful experience.
- nikmobi 10y agoI've been using VSCode for C development fairly successfully, although I don't recall if I ever got the debugging working (due to the same reasons you describe). I do remember getting debugging working was a nightmare and had only minimal success on various different platforms (linux, OS X). I'd suggest installing the clang extension, this was the best out of the box experience for auto completion etc in VSCode.
- jmdavis_squid 10y agoThanks to both of you for the feedback on the debugging options for the C++ extension. I'll pass this on to to the documentation folks to get better launch.json documentation released. I know it isn't ideal, but in the meantime, the best way to get more info is probably the comments that appear when hovering over the fields in the launch.json file or to open up the package.json file to read the comments about each available field in the schema for the extension. The package.json can be found in the .vscode sub-folder of your user account. On my machine, this would be ~/.vscode/extensions/ms-vscode.cpptools-0.8.1\package.json.
- girvo 10y agoYou're not wrong about the documentation for "launch.json", but one thing to play around with is: open it up and use the autocomplete. It helped me discover loads of options that I hadn't seen documented anywhere!
- faizmokhtar 10y agoNot sure if this is helpful but I just found their Github repo consisting of the tips and tricks for VSCode. Github: https://github.com/Microsoft/vscode-tips-and-tricks https://github.com/Microsoft/vscode-tips-and-tricks
- slammers 10y agoHi, I'm from the VS Code team. We've tried to address this including for C++ https://code.visualstudio.com/docs/languages/cpp https://code.visualstudio.com/docs/languages/cpp. Can you confirm that you have seen that doc? I opened an issue on github to address the lack of documentation for C++ debugging. https://github.com/Microsoft/vscppsamples/issues/135 https://github.com/Microsoft/vscppsamples/issues/135