iarsystems / iar-vsc-build

Visual Studio Code extension for developing and building IAR projects
Mozilla Public License 2.0
38 stars 5 forks source link

Plugin can not find the project file location: ENOENT: no such file or directory, stat #84

Closed dudamao closed 1 month ago

dudamao commented 2 months ago

Describe the bug: Hey friends in IAR, I encountered a path recognition issue while using this plugin. Although a project file exists in the folder, the plugin indicates that it cannot find the file. I suspect a possible cause is that the plugin automatically adds spaces when recognizing the path.

image

file path: C:\main\dev\MCAL_Motor\iar\iar_v850\E3_ref_gateway_E3640

error: Could not parse project file 'c:\main\dev\MCAL_Motor\iar\iar_v850\E3_ref_gateway_E3640\E3_ref_gateway_E3640.ewp ': ENOENT: no such file or directory, stat 'c:\main\dev\MCAL_Motor\iar\iar_v850\E3_ref_gateway_E3640\E3_ref_gateway_E3640.ewp ' image

To Reproduce: using a VSCode Workspace include project folder can reproduce this issue.

Environment:

HampusAdolfsson commented 1 month ago

Hi,

Could you please check your workspace file (E3_ref_gateway_E3640.eww) to see whether there might be a space at the end of the project path, as in this example: image

The extension reads the path directly from the .eww file, so a space at the end would cause the error you described. Note that the Embedded Workbench IDE is able to find the right file even with a space at the end of the path, which would explain why you're only seeing this error in VS Code.

dudamao commented 1 month ago

Hi Hampus, Thank you very much for your explanation. This was exactly my issue, and after modifying the .eww file, my problem was solved. I hope that in future plugin updates, this suggestion can be added to the error message.