Forum Discussion
How to find my console.log()-Messages when developing a visual with Power BI Desktop
- 5 years ago
Hi Anonymous,
Power BI Desktop isn't a functioning browser and uses CefSharp to render the report canvas and some other parts that have parity with the Service.
Adding browser developer tools would be a non-trivial task for a small subset of users. Although you could also create an idea for it - I'd be happy to vote on it if you do 🙂
In my opinion, while debugging in Desktop is desirable, the browser is a sensible location for testing and debugging as the majority of end users will be consuming your visual in the Service as readers, and browsers offer the ability to extend dev tools on offer (e.g. if your using React or Redux, you can install additional tools to help debug these frameworks).
The developer visual is updated more frequently via the Service also, so we get access to new features more readily than having to wait until the next Desktop release, when a newer developer visual host might be packaged in with it (it typically is).
If you absolutely have to use Desktop and want some form of diagnosis, you can use alert() to display errors in a message box, but this is not a great workaround (it won't work in the Service). What might be a better approach is to add an element like a textarea to your visual and append output into that (and have this enabled or disabled through a global constant or class, so that when it's ready to move to production, it's hidden from your end users.
Good luck,
Daniel
Hi,
If you are still struggling with this problem, I have just written a blog about how to get Dev Tools working with Power BI Desktop.
Please follow the link:
Br, Mikko