vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Extract to function sometimes adds a #include with the folder missing from the path

Open sean-mcmanus opened this issue 1 year ago • 0 comments

We have a repro internally with main.cpp line 208 (call to fclose). It adds "<file>.h" instead of "<parentFolder>/<file>.h" where <parentFolder> is not in the includePaths (but its parent is).

It's possible the bug could repro with Create Declaration/Definition too. I'm not sure yet if it ever adds the <parentFolder>.

I'm not sure if it repros with VS yet.

With Debug bits it fails with "Unknown error" before any code is generated.

Image

sean-mcmanus avatar Oct 29 '24 17:10 sean-mcmanus