liprec / powerbi-d3jsvisual

Home of the code of my Power BI Custom Visual: D3JS Visual
MIT License
57 stars 20 forks source link

Enable console output in the browser #2

Open gorgi opened 6 years ago

gorgi commented 6 years ago

Hey, great work!

I think that it will be really neat if you can enable logging of objects. Maybe cross-wire console.log through the pbi object? Even better if you can add a separate output window inside the visual for debugging in the desktop app.

What's your take on contributions? Maybe I can work on this feature as I am a custom visual developer my self :)

liprec commented 6 years ago

Hi,

Thanks for the feedback. I am looking into a way to enable extra logging/debugging regarding the visual. At this moment the code is evaluated in a try..catch container and exceptions are written to the console already. But I really like the idea of an extra log method as part of the PBI object. And my idea is to only enable it if the report is in 'edit' mode.

And feel free to submit a PR.

BillmanH commented 5 years ago

When writing D3.js code in dev, I often use console.log('test') to check my assumptions and troubleshoot. The D3 app either works or it doesn't but won't give you any feedback or troubleshooting support. A console window would really help. As is I can't use it because you can only import already working code, which means you can't really customize anything.