max icon indicating copy to clipboard operation
max copied to clipboard

[BUG]: this may not be a bug but it certainly needs to be fixed

Open batman22 opened this issue 11 months ago • 5 comments

I just installed everything and got it up and running in VS Code. Can run write and run mojo programs not problem. Just can't hit breakpoints?! I've tried all the settings tweaking and what nots to no avail. Mindblowing this doesn't just work with the mojo extension. I suspect it is supposed to. Please help, I really want to try mojo, but if can't do basic debugging, it's a non starter.

I'm on Mac OSX 14.4, and my VS Code says it's up to date with v. 1.87.2 and I've got mojo 24.1.1 installed.

Help.

Jay

batman22 avatar Mar 23 '24 23:03 batman22

Possible duplicate of modularml/mojo#1924.

mikowals avatar Mar 24 '24 00:03 mikowals

Yes, that sounds exactly like what I'm experiencing.

batman22 avatar Mar 24 '24 23:03 batman22

@walter-erquinigo @River707 - PTAL when you get a moment

iamtimdavis avatar Mar 25 '24 00:03 iamtimdavis

Thanks for reporting this! We've identified an issue with the currently shipped SDK where we're accidentally stripping symbols used by the debugger for JIT debugging. We're working on a fix, but it will likely only resolve issues on Linux platforms for the next release, resolving this for Mac will likely make it into the 24.3 release of Mojo/Max (not the next release, but the one after). Terribly sorry for the issues encountered! 🙇

River707 avatar Mar 25 '24 14:03 River707

Thank for the report and apologies for the broken function. However, I'm going add here some troubleshooting until we get the proper fix out:

Regular non-JIT debugging still working, so if you want to debug the program foo.mojo, you can run the following two commands from a terminal

mojo build -O0 -debug-level=full foo.mojo -o /tmp/bin
mojo debug --rpc /tmp/bin 

That should start the debug session on VSCode, via the --rpc functionality, without having to JIT. I hope this can get you unblocked.

walter-erquinigo avatar Mar 25 '24 15:03 walter-erquinigo

Please see https://github.com/modularml/mojo/issues/1924 and reopen if you still have issues!

iamtimdavis avatar Jul 14 '24 19:07 iamtimdavis