paulo-fernando-silva / vscOctaveDebugger

MIT License
35 stars 4 forks source link

The editor could not be opened because the file was not found #70

Open JAVIERDET opened 1 month ago

JAVIERDET commented 1 month ago

Hi there,

I have a project with two main files directly located in the workspace folder and other scripts defined in folders inside the workspace. Something like this:

Workspace/ --run_ALG.m --run_GEN.m --src/ ---- problematic_file.m ... "I'm using the Octave debugger on my Windows machine. I get this warning when the debugger tries to access a file that is in the workspace but under the src folder: image

I think the problem has to do with the debugger not detecting the src folder content. If I move the file to the workspace directory, the problem disappears. I've tried different launch.json options, adding the src path directly to the sourceFolder variable using ';' as a separator, as is the output of the Octave pathsep() command: "octave:1> pathsep() ans = ;" I've also tried with ":" just in case this was the problem... I do not know what the problem is and why it is not detecting the folder. Maybe a prelaunch task is needed where all the paths must be added? Thanks in advance! PD: here the launch.json as it is right now (only adding the workspace gives the same problem): image

paulo-fernando-silva commented 1 month ago

Can you share a minimal example that reproduces that error? Either a zip attachment or a git repo,

JAVIERDET commented 1 month ago

Sorry, I cannot share the code as it is protected. However, if you need more information, I can try to share it. I can provide a photo of the tree code. image "In the illustration, you can see the process in green. run_RUN_ALG.m is the main file; it then enters into RUN_ALG.m. With these two files, as they are in the workspace 'main' folder, the debugger works well and is able to display them. Then CUPI.m comes into play, and the debugger is not able to show it. However, as I mentioned before, if I move CUPI.m to the 'main' folder (extracting it from 'src'), the debugger is able to show it.

Hope this helps.

JAVIERDET commented 1 month ago

Just for you to know, I've tried this same repo on a Linux machine, and the problem disappears, so it has something to do with the way the extension works in Windows, I guess.

paulo-fernando-silva commented 1 month ago

Can you reproduce that with a dummy project with placeholder functions and 3 files with similar structure? Having a consistent way to reproduce the issue helps a lot. Unfortunately, I don't have a windows machine to test at the moment so it might take a bit longer to fix.

JAVIERDET commented 1 month ago

Hi! I tried to replicate the error with a dummy project but wasn't able to. In this case, the editor was able to show the file which is inside the src subfolder. So, maybe it is something about the specific configuration of the project at hand. I don't know. As I was able to run it on Linux and also the dummy project worked, you can close the issue if you want. If I find what was causing the problem, I will post it here. Thanks for the help!!