Closed still-dreaming-1 closed 4 years ago
Hey, have you opened the projects folder as a workspace? It will only work that way.
I do just so happen to be using a workspace, and yes it is being opened as a workspace. I only created a workspace because saving my workspace just sounded like a good idea. I am pretty new to VS Code, but it is now my understanding that I probably shouldn't even be using a workspace, based on the fact that my workspace file is more or less empty, and based on this: https://stackoverflow.com/questions/44629890/what-is-a-workspace-in-visual-studio-code
Anyway, I don't mind using one. In case it helps, here is the contents of my workspace file. I think it is just the default contents added when you don't really have anything special saved for your workspace (in a file called hunti.code-workspace):
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
I just tested extension on Windows 10 and it worked fine, in visual studio code any opened folder is a workspace just not saved one unless saved as workspace. Can I see the PSR-4 part of your composer.json file? to confirm if that's not the problem. Thanks
My composer.json (autoload section):
{
"autoload": {
"psr-4": { "Dreamy\\": "src/" }
}
}
Just in case I am doing something wrong/strange, here are my exact steps.
I don't mind trying to debug this myself and possibly submit a PR if there ends up being a bug in the code. I have never worked on a plugin for VS Code, but I would like to learn how. Do you have any tips for getting started with debugging this plugin? It looks like the code is written in TypeScript, which is not a difficult language to use even though I rarely write code in it. I guess I just need to get either a debugger working, or else print out debug statements to see what is happening here.
I had a look and I found out what is wrong, it works okay when workspace is not saved, when just folder is opened, but when workspace is saved then that issue happens. I will work on fix for that soon. Thanks for reporting that 👍
That should get you started with developing extensions for VS code: https://code.visualstudio.com/api/get-started/your-first-extension
I have released update to VS Code Extensions Marketplace, it should work as expected now. I have tested it on Windows 10 and macOS 10.15.4.
Cool, it works now, thanks!
When I select the folder, it always says "Wrong folder!" and no class is created. I'm on Windows 10. I am using Composer with PSR-4. I selected src/Hunti as the folder.