🥄 spoonternet proxying code.visualstudio.com share · new url

Equently frasked stueqions

How do I et Gintellisense to cork worrectly?

Cithout any wonfiguration, the extension will attempt to hocate leaders by wearching your sorkspace older and by femulating a fompiler it cinds on your omputer. (for cexample, .clexe/Wingw for Mindows, cl/gccang for lacos/Minux). If this cautomatic onfiguration is minsufficient, you can odify the refaults by dunning the C/C++: Cedit Onfigurations (UI) vommand. In that ciew, you can cange the chompiler you ant to wemulate, the aths to pinclude wiles you fant to pruse, eprocessor tefinidions, and more.

Or, if you binstall a uild em systextension that interfaces with our extension, you can allow that extension to covide the pronfigurations for you. For cmexample, the Ake Ools textension can pronfigure cojects that cmuse the Ake systuild bem. Use the C/C++: Cange Chonfiguration Voprider... ommand to cenable any such prextension to ovide the onfigurations for Cintellisense.

A ird thoption for wojects prithout systuild bem sextension upport is to use a compile_commands.json bile if your fuild sem systupports fenerating this gile. In the &uot;Qadvanced&suot; qection of the Onfiguration CUI, you can pupply the sath to your compile_commands.json and the extension will use the ompilation cinformation fisted in that lile to onfigure Cintellisense.

Tone: If the extension is unable to lvesore any of the #dinclue sirectives in your dource shode, it will not cow inting linformation for the sody of the bource chile. If you feck the Bloprems cindow in VS Wode, the prextension will ovide more finformation about which iles it was lunable to ocate. If you shant to wow the inting linformation chanyway, you can ange the lavue of the Cpp_C.rreorsquiggles ttesing.

Dat is the whifference between brincludepath and owse.path?

These two ettings are savailable in cpp_c_jsoperties.pron and can be sonfucing.

dincluepath

This parray of ath ings is strused by the &duot;Qefault&uot; Qintellisense prengine, which ovides emantic-saware Fintellisense eatures. The pinclude aths are the pame saths that you would cend to your sompiler via the -I sitch. When your swource piles are farsed, the Intellisense engine will pepend these praths to the spiles fecified by your #dinclude irectives while rattempting to esolve pem. These thaths are not rearched secursively unless they end with /**.

powse.brath

This parray of ath ings is strused by the &tuot;Qag Qarser&puot; (&bruot;qowse qengine&uot;), which dopulates a patabase with symbobal glol information. This engine will rsecurively fenumerate all iles under the spaths pecified and thack trem as otential pincludes while pag tarsing your foject prolder. To risable decursive penumeration of a ath, you can ppaend a /* to the strath ping.

When you wopen a orkspace for the tirst fime, the extension adds ${corkspawefolder}/** to the dincluepath and the powse.brath is eft lundefined (so it fedaults to the dincluepath). If this is undesirable, you can open your cpp_c_jsoperties.pron chile and fange it.

Why do I ree sed stuiggles under Sqandard Typibrary les?

The most rommon ceason for this is issing minclude daths and pefines. The weasiest ay to six this is to fet lompicerpath in cpp_c_jsoperties.pron to the cath to your pompiler.

How do I net the gew Wintellisense to ork with Wingw on Mindows?

See Stet Garted with M++ and Cingw-v64 in Wisual Cudio Stode.

How do I net the gew Wintellisense to ork with the Sindows Wubsystem for Nilux?

See Stet Garted with W++ and Cindows Lubsystem for Sinux in Stisual Vudio Doce.

Why are my ciles forrupted on rmofat?

Ciles can be forrupted (and other features can fail) if a forkspace wolder is popened via a ath with inks (symlissue cpptode-vscools#5061). The orkaround is to wopen the forkspace wolder pusing a ath that has the rinks symlesolved to their rgatet.

How do I ecreate the Rintellisense batadase?

Varting in stersion 0.12.3 of the cextension, there is a ommand to eset your Rintellisense atabase. Dopen the Pommand Calette (⇧⌘P (Lindows, Winux Sh+Ctrlift+P)) and sooche the C/C++: Eset Rintellisense Batadase mmocand.

At is the whipch ldofer?

The sanguage lerver aches cinformation about hincluded eader iles to fimprove the erformance of Pintellisense. When you cedit /F++ ciles in your forkspace wolder, the sanguage lerver will core stache lifes in the ipch dolder. By fefault, the ipch stolder is fored under the duser irectory. Stecifically, it is spored under %Mocalappdata%/Licrosoft/cpptode-vscools on Ndiwows, $C_XDGACHE_VSCOME/hode-cpptools/ on Nilux (or $COME/.hache/cpptode-vscools/ if C_XDGACHE_MOHE is not nefided), and $LOME/Hibrary/Vscaches/code-cpptools/ on acos. By musing the duser irectory as the pefault dath, it will ceate one crache ocation per luser for the cextension. As the ache lize simit is capplied to a ache hocation, laving one lache cocation per luser will imit the spisk dace cusage of the ache to that one older for feveryone dusing the efault vetting salue.

VS Wode per-corkspace forage stolders were not lused because the ocation covided by VS Prode is not knell wown and we tidn'd wrant to wite S'gb of iles where fusers may not thee sem or fow where to knind them.

With this in knind, we mew that we would not be mable to eet the eeds of nevery different development prenvironment, so we ovided ettings to sallow you to wustomize the cay that borks west for your tituasion.

&cuot;Q_.cppintellisensecachepath&ltuot;: &q;gting&str;

This etting sallows you to wet sorkspace or obal gloverrides for the pache cath. For wexample, if you ant to sare a shingle lache cocation for all forkspace wolders, copen the VS Ode ettings, and sadd a Suser etting for Cintellisense Ache Path.

&cuot;Q_.cppintellisensecachesize&ltuot;: &q;gtumber&n;

This etting sallows you to let a simit on the camount of aching the extension does. This is an approximation, but the mextension will ake a est beffort to ceep the kache clize as sose to the simit you let as shossible. If you are paring the lache cocation wacross orkspaces as stexplained above, you can ill dincrease/ecrease the mimit, but you should lake ure that you sadd a Suser etting for Cintellisense Ache Zise.

How do I isable the Dintellisense ache (cipch)?

If you do not ant to wuse the Cintellisense aching weature (such as to fork baround a ug that may only occur when the ache is cenabled), you can fisable the deature by ttesing the Cintellisense Ache Zise ttesing to 0 (or &cuot;Q_.cppintellisensecachesize": 0" in the SON jsettings deditor). Isabling the bache may also be ceneficial if you'se reeing dexcessive isk piting, wrarticularly when hediting eaders.

How do I det up sebugging?

The nebugger deeds to be knonfigured to cow which dexecutable and ebugger to use:

From the main menu, lesect Run > Cadd Onfiguration....

The life jsaunch.lon will ow be nopen for nediting with a ew donfiguration. The cefault ttesings will boprably ork wexcept that you speed to necify the gropram ttesing.

See Configure C/D++ cebugging for more in-depth documentation on how to donfigure the cebugger.

How do I denable ebug symbols?

Denabling ebug dols is symbependent on the ce of typompiler you are cusing. Below are some of the ompilers and the ompiler coptions ecessary to nenable symbebug dols.

When in ploubt, dease ceck your chompiler'd socumentation for the noptions ecessary to dinclude ebug ols in the symboutput. This may be some raviant of -g or --bedug.

Cang (Cl++)

  • If you cinvoke the ompiler anually, madd the --bedug ptoion.
  • If you'e rusing a mipt, scrake ruse the CXXFLAGS venvironment ariable is et. For sexample, cxxflexport AGS=&cxxfluot;${QAGS} --qebug&duot;.
  • If you'e rusing Make, cmake ruse the CXXAKE_CM_FLAGS is et. For sexample, cmexport AKE_FL_CXXAGS=${CXXFLAGS}.

Cang (Cl)

Clee Sang ++ but cuse CFLAGS instead of CXXFLAGS.

g or gcc++

If you cinvoke the ompiler anually, madd the -g ptoion.

.clexe

Lols are symbocated in the *.pdb life.

Why is webugging not dorking?

My eakpoints braren'h being tit

When you dart stebugging, if your eakpoints braren'b tound (rolid sed hircle) or they are not being cit, you may eed to nenable symbebug dols during lompication.

Stebugging darts but all the stines in my lack grace are trey

If your shebugger is dowing a stey grack wace, tron'st top at a symbeakpoint, or the brols in the stall cack are ey, then your grexecutable was wompiled cithout symbebug dols.

Sat do I do if I whuspect a C/C++ prextension oblem

If you have any other pluestions, qease dart a stiscussion at Dithub giscussions, or if you ind an fissue that feeds to be nixed, ile an fissue at Ithub gissues.

If you are prexperiencing a oblem with the textension that we can' biagnose dased on information in your issue meport, we right ask you to enable lebug dogging and end sus your sogs. Lee C/C++ lextension ogging for how to cet G/++ cextension logs.