netbeans debugger support for mirah

39 views
Skip to first unread message

Vladislav Kozyr

unread,
Jan 21, 2015, 7:27:15 AM1/21/15
to mi...@googlegroups.com
Hi, Steve.

Do you occationally have thoughts or vision on how to implement debugger for mirah. There is currently no option to get java source files from mirahc. So plain java debugger support for netbeans would not work. I could guess from class_compiler.mirah and bytecode.mirah that debugger info is implemented in class files generated by mirahc. There are visitSource and visitLineNumber calls. 
I see an option to implement adding java brakepoints for .mirah files, so that triggering brake point would navigate to line in mirah file. Not quite sure it's possible, as there are checks in java debugger implementations in netbeans that prevents adding brakepoints  for non java files. I will experiment with that, but what other options|ideas do you see here?

Thank you for your time,
Vlad

Steve Hannah

unread,
Jan 25, 2015, 10:46:17 AM1/25/15
to mi...@googlegroups.com
Hi Vlad,

Sorry for the delay in reply.  I do plan to get to debugger support.  I just haven't had a lot of time to work on mirah lately (real job & family life, etc...).  I don't think it should be too difficult.  Ultimately it is just compiling to the same java byte code as the java source.  I just need to tell netbeans that :)

But I don't have any helpful suggestions at this point for the implementation.  My plan of action would be to check the netbeans source to see how they do it for java, then see what needs to be done to make this work for Mirah.  If you want you can add an issue to the issue tracker.

Steve

--
You received this message because you are subscribed to the Google Groups "The Mirah Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirah+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Web Lite Solutions Corp.

Vladislav Kozyr

unread,
Jan 28, 2015, 2:30:37 AM1/28/15
to mi...@googlegroups.com
Actually, I've reviewed debugger support for jsp and scala netbeans. Both use netbeans JPDA debugger API/SPI.  Debugger support code could be copy-pasted from scala.debugger with minor modifications to mirah. We plan start using mirah in our project and implement debugger support anyway.Could implement it and do push request in mirah-nbm in the scope of three of weeks.
Regards,
Vlad

Steve Hannah

unread,
Jan 28, 2015, 10:15:35 AM1/28/15
to mi...@googlegroups.com
That would be awesome!  Thanks for the contributions.

Steve

Raum Dellamorte

unread,
Feb 3, 2015, 1:26:20 PM2/3/15
to mi...@googlegroups.com
The road blocks are being ripped away, one by one!  While Mirah has its arse pains, what with trying to figure out how to do various Java things in it and circumnavigating what can't yet be done, I find it far less irritating than all the ceremonial and mechanical declarations and ugliness of Java.  More and more I find myself writing Mirah code as I expect it to work and it does!  The NetBeans plugin helps already because it catches most common errors before I bother to compile, and what's left are the errors in my logic.  That and being able to write small Java classes to do what I can't yet in Mirah.

It pleases me to no end to hear tale of another project involving Mirah.  It's at a point such that if development of the compiler stopped, Developer God forbid as there are Java 8 features that seem right up Mirah's alley, Mirah could go on being useful for quite a long time.  I'm more patient for the next version of the compiler because it's gotten so good.  Go Mirah!
Reply all
Reply to author
Forward
0 new messages