obadakhalili
obadakhalili
MModular
Created by obadakhalili on 4/8/2024 in #questions
Debugging Issue with Mojo's VSCode Debugger
I have a file ./foo/bar.mojo that imports a package in ./, so to run it I have to use the CLI path argument (-I) as follows: mojo build -I . ./foo/bar.mojo. The problem occurs when I try to debug the file with Mojo's VSCode debugger, getting the error message unable to locate module 'x', the same error message that throws if I try to run bar.mojo without the path argument, so it seems like the problem is that I have to specify the path argument for the debugger too. I tried to update the launch file configuration by setting the args property to "args": ["-I", "../"], which does show up in the final command but still doesn't work throwing the same error message.
38 replies