lvgl / lv_port_pc_vscode

MIT License
239 stars 147 forks source link

fixed VS Code workspace file after v9 upate #35

Closed gcopoix closed 6 months ago

gcopoix commented 6 months ago
kisvegabor commented 6 months ago

Thank you for the prompt reply! :heart_eyes:

I've just tried it out but it doesn't work on my end. After clicking Run > Start Debugging I got this image Where I selected the C++ Debugger.

After that this error happened: image

gcopoix commented 6 months ago

Just tested on a clean machine:

  1. clone Repo (recursive)
  2. checkout feature branch
  3. open VSCode by doubleclick on workspace file (or enter code <path/to/simulator.code-workspace)
  4. let VSCode install recommended plugins (if not already installed)
  5. Select cmake::Configure, if VSCode asks for kits select unspecified, cmake will select the default native gcc)
  6. click Run > Start Debugging (or press F5)
  7. et voilà

May be it makes it more convenient if cmake.configureOnOpen is set to true in the workspace file, could you please give it a try?

And: It may be a good idea if problems still remain to try with a deleted build folder, especially if basic cmake settings have been changed (or if you have some 'old' build configuration from an earlier version) Another idea: Do you have a .vscode folder with some (additional) settings? This folder can be deleted.

kisvegabor commented 6 months ago

Getting closer! After removing the build, bin, and the .vscode folders, adding cmake.configureOnOpen: true and starting with simulator.code-workspace it was configured, on F5 it was compiled, but finally it failed because bin/main is not found:

image

However bin/main exists.

danyyliu commented 6 months ago

I cloned the repo in another directory, started everything from the beginning, and met the same problem: image

Then I checked the vscode doc, and it says: image

So, I am wondering if full path means it should have the env variable workspaceFolder: "program": "${workspaceFolder}/bin/main"

kisvegabor commented 6 months ago

It's working well now! Thank you very much! :tada: