You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add handling of MSVC /external:var option and EXTERNAL_INCLUDE env variable. #14205
It look like /external:var and EXTERNAL_INCLUDE are not handled. These should influence IntelliSense configurations by potentially adding include paths. (Identifying include path not previously specified, as external, will implicitly specify them as include paths.)
Some behavior clarification is here, in the context of aligning clang-cl behavior with MSVC: llvm/llvm-project#105738
I have submitted PR #14208 to address this. It implements robust parsing for the specialized MSVC/clang-cl flags and automatically resolves the EXTERNAL_INCLUDE environment variable ensuring these paths are correctly injected into the IntelliSense configuration.
Hi Subham (@Subham-KRLX) . This is something we need to implement in our native component, where we currently support /external:I and the INCLUDE env variable, in common code shared with other projects. I don't think we can take a fix for this in the OpenSource TypeScript component.
Colen Garoutte-Carson (@Colengms) I understand that this needs to be handled in the native component alongside the existing /external:I and INCLUDE support. I will close my PR. Appreciate the context.
Colen Garoutte-Carson (@Colengms)EXTERNAL_INCLUDE should influence IntelliSense, but looks like it is not possible to set EXTERNAL_INCLUDE by configurationProvider.
As vscode-cmake-tools can setup custom environment variables by environmentSetupScript, I am trying to provide EXTERNAL_INCLUDE to IntelliSense through compilerArgs with /external:I in microsoft/vscode-cmake-tools#4718.
Can we handle /external:I as system includes or provide a way to set EXTERNAL_INCLUDE by configurationProvider?
Hi huangqinjin . That would not be correct behavior. There are some common misconceptions around how they are intended to be handled. (i.e. llvm/llvm-project#181294 ) At the compiler level, /external:I and EXTERNAL_INCLUDE are intended for diagnostic filtering only. While there is a scenario in which they may add non-system include paths (as a side effect of failing to find an existing non-system include path to consider a system include path solely for the purpose of diagnostics), they do not modify the compiler (or IntelliSense) include paths to specify system search order.
With MSVC, /external:I can add an include path (if /external:W# is also specified) to be considered "external" for the purpose of external header diagnostics only. It does not specify that the include path should be a "system" include path (like gcc and clang's -isystem arg). I don't believe MSVC provides an argument that would allow the caller to add a system include path.
Unfortunately, at this time, there does not appear to be any option to cause cl.exe to consider an additional include path as a system include path. clang-cl does exhibit this behavior, but only due to a bug ( llvm/llvm-project#181294 ).
Activity
Subham-KRLX commentedon Feb 23, 2026
Colen Garoutte-Carson (@Colengms) i would like to fix this issue can you please assign this to me.
Subham-KRLX commentedon Feb 23, 2026
I have submitted PR #14208 to address this. It implements robust parsing for the specialized MSVC/clang-cl flags and automatically resolves the EXTERNAL_INCLUDE environment variable ensuring these paths are correctly injected into the IntelliSense configuration.
Colengms commentedon Feb 23, 2026
Hi Subham (@Subham-KRLX) . This is something we need to implement in our native component, where we currently support
/external:Iand theINCLUDEenv variable, in common code shared with other projects. I don't think we can take a fix for this in the OpenSource TypeScript component.Subham-KRLX commentedon Feb 24, 2026
Colen Garoutte-Carson (@Colengms) I understand that this needs to be handled in the native component alongside the existing /external:I and INCLUDE support. I will close my PR. Appreciate the context.
huangqinjin commentedon Feb 28, 2026
Colen Garoutte-Carson (@Colengms)
EXTERNAL_INCLUDEshould influence IntelliSense, but looks like it is not possible to setEXTERNAL_INCLUDEbyconfigurationProvider.As
vscode-cmake-toolscan setup custom environment variables byenvironmentSetupScript, I am trying to provideEXTERNAL_INCLUDEto IntelliSense throughcompilerArgswith/external:Iin microsoft/vscode-cmake-tools#4718.Can we handle
/external:Ias system includes or provide a way to setEXTERNAL_INCLUDEbyconfigurationProvider?Colengms commentedon Nov 4, 2026
Hi huangqinjin . That would not be correct behavior. There are some common misconceptions around how they are intended to be handled. (i.e. llvm/llvm-project#181294 ) At the compiler level,
/external:IandEXTERNAL_INCLUDEare intended for diagnostic filtering only. While there is a scenario in which they may add non-system include paths (as a side effect of failing to find an existing non-system include path to consider a system include path solely for the purpose of diagnostics), they do not modify the compiler (or IntelliSense) include paths to specify system search order.Unfortunately, at this time, there does not appear to be any option to cause
cl.exeto consider an additional include path as a system include path.clang-cldoes exhibit this behavior, but only due to a bug ( llvm/llvm-project#181294 ).