Forum Discussion
How do I find out what doesn't work?
I'm currently trying to understand how visuals are developed per TypeScript. My experience with programming is mostly limited to C# in school - so not that much. That means that I'm having a lot of troubly unterstanding it completely.
In order to pick up the way visuals are created, I wrote the simple bar chart myself - by copying it line by line, and looking at what everything does. It helped me a lot. When I start the server, load the developer visual, and add data to it - nothing happens. Only the update count goes up.
The config/capability files are all the same as in the github example. The barchart code is the same, too.
How can I "debug" this file? How do I find out, what is going wrong?
EDIT: Editing to say, that I have tried debugging.
You should use module instead of namespace:
namespace powerbi.extensibility.visual
As a result you should have this:
module powerbi.extensibility.visual
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
9 Replies
- v-chuncz-msftCommunity Support
Make sure you run command in the right visual project and the file name in tsconfig.json is correct. To debug your visual, use the try...catch statement.
https://github.com/Microsoft/PowerBI-visuals/blob/master/tools/debugging.md
- ConnectedRomanFrequent Visitor
Hello, thank you for your time.
I have already tried debugging, but there were no errors. When I try compiling my code with pbiviz start, it throws this error in the .tmp/precompile/visualPlugin.ts file:
{Projectname} is not a property of "Visual"
The filenames/-paths in pbiviz.json and tsconfig.json are right.
- v-viigCommunity Champion
Did you fill capabilities.json?
Could you please share your current code?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals