devtbi / vscode-cppinsights

cppinsights extension for vscode
The Unlicense
12 stars 1 forks source link

Fix cpp-insights command line args generation #11

Closed OkazakiNagisa closed 2 years ago

OkazakiNagisa commented 2 years ago

When processing a source file with filename/path existing spaces, the extension throws an error. I try to fix this by making path arg quoted.

devtbi commented 2 years ago

thx a lot for reporting! i'll look into it... would be nice if there was a more generic way, which also escapes quotes in the path

devtbi commented 2 years ago

uh okay... it seems to work just fine for me... can you tell me which OS, vscode version you are using and an example path that does not work?

OkazakiNagisa commented 2 years ago

vscode, extension and system info

版本: 1.64.0 (system setup) 提交: 5554b12acf27056905806867f251c859323ff7e9 日期: 2022-02-03T04:22:20.678Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19044 名称: C++ Insights ID: devtbi.vscode-cppinsights 说明: vscode extension for C++ Insights 版本: 1.0.1 发布者: Tobias Fuchs VS Marketplace 链接: https://marketplace.visualstudio.com/items?itemName=devtbi.vscode-cppinsights

screenshot

图片

devtbi commented 2 years ago

thanks... after fiddling with my system settings, I was able to reproduce this. Seems like default terminal app needs to be set to "Windows Console Host" & "Replace Command Prompt with Windows PowerShell" needs to be set. I think I've found a more general fix, because quoting will only work if there are no quotes in the name, & also applied it to all other paths: https://github.com/devtbi/vscode-cppinsights/pull/12

OkazakiNagisa commented 2 years ago

thanks🥳