[ANN] Cappuccino now supports source maps

57 views
Skip to first unread message

Martin Carlberg

unread,
Dec 11, 2017, 5:20:22 AM12/11/17
to Cappuccino & Objective-J
Hi!

Today I want to announce that the Cappuccino framework now supports javascript source maps. This allows browser debugging and stepping in the Objective-J source file instead of the compiled javascript file.

Source maps are now turned on for DEBUG mode by default. Also new projects has this for DEBUG mode.

It is really nice to be able to step into Foundation and AppKit methods and be able to easily read the code and all the comments directly in the debugger.


To turn this option on for your project add the -S flag in your Jakefile. Search for the setCompilerFlags function to find where the compiler options are set.

In the Browser you need to add SourceMap as compiler option to your index-debug.html file. The line should look something like this:
OBJJ_COMPILER_FLAGS = [... , "SourceMap"];

It is also recommended to add the compiler option "InlineMsgSend" for easier debugger "step into" functionality and cleaner stack display.
In the Jake file add the --inline-msg-send flag. In the index-debug.html file add "InlineMsgSend".

To use it you need the laster Cappuccino version from the master branch on github. https://github.com/cappuccino/cappuccino

All browsers support source maps but at the moment Chrome as the best support.

Please check it out!


Happy coding,

- Martin

Todd Freese

unread,
Dec 11, 2017, 10:13:19 AM12/11/17
to Cappuccino & Objective-J
Christmas comes early!

This is truly awesome!

T

Kjell Nilsson

unread,
Dec 11, 2017, 11:23:24 AM12/11/17
to objec...@googlegroups.com
I have used it for some time now and debugging has suddenly become a delight!

:-)
—kerusan


--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages