yoctoproject / vscode-bitbake

Bitbake language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake
Other
45 stars 10 forks source link

failure during sanity check, chdir(2) failed.: No such file or directory #306

Closed SpieringsAE closed 3 months ago

SpieringsAE commented 3 months ago

When scanning it errors out at the start, yet when I open a terminal myself and enter the command it shows me, everything works:

. /path/to/workdir/sources/poky/oe-init-build-env /path/to/workdir/build && which devtool bitbake || true

Is what it shows me it executes. The chdir has to be the one at the end of oe-init-build-env, but when I try to debug print the $BUILDDIR variable I cannot see any output from the extension so I can't verify that it is correct there.

Is there a way I can get more debug info? I've tried changing the log level but I guess thats for a different purpose.

deribaucourt commented 3 months ago

Hello, thanks for your report.

Before running any command, the shell environment has to browse to the path bitbake.workingDirectory. Make sure to check this setting is properly configured in your workspace.

If you enabled the debug log level, you should see more input in the "Output" -> "Bitbake" and "Output" -> "Bitbake Language Server" views (as illustrated). Could you provide the logs produced in both of these pannels in your case?

image

SpieringsAE commented 3 months ago

Well, turns out I am a bit of an idiot, it seems I messed up bitbake.workingDirectory parameter.

I didn't realize I could switch to different contexts in the 'output' view, so thats a nice thing to learn. But yeah with that setting fixed it seems to work now, I would not have thought of it without your hint though.

Many thanks for that!

deribaucourt commented 3 months ago

Thanks for your feedback! Maybe this is something we could improve on, like adding a more detailed explanation when this kind of error is thrown. Either in our troubleshooting guide, or directly in the error popup.