cmajor-lang / cmajor

The Cmajor public repository
https://cmajor.dev
Other
522 stars 31 forks source link

Possible to console.log in UI files? #25

Closed wildyeast closed 9 months ago

wildyeast commented 9 months ago

I'm experimenting with custom UIs for Cmajor patches and I have a hard time debugging the JS files. In the docs you casually mention the possibility to print logs to the console, but I can't see them anywhere. Any ideas?

julianstorer commented 9 months ago

That's not a Cmajor thing, it's just standard javascript: you do a console.log (whatever) to print to the console.

wildyeast commented 9 months ago

I understand. However, the output of console.log() is not printed to the console in which cmaj play is running. Where do I see the output?

julianstorer commented 9 months ago

You'd open the browser debug panel (right-click usually has it on the popup menu, and there are key shortcuts for this), and it's all in there.

I hadn't thought of having something that redirects logging back to the console app's output, that's not a bad idea for a feature. But normally whenever you're developing a javascript UI, people tend to have the browser debug panel going

wildyeast commented 9 months ago

I had not realised that the patch window is, in fact, a browser. Thanks!