Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Can we manage Power Bi custom Visual in Visual studio 2019 (not visual studio code)?

Coming from a C# developer, I loved to use Visual Studio to mange my projects.  Having very little knowledge in Typescript, I am developing a power bi custom visual,  VS Code is small but lack of so many features that I am used to in Visual Studio 2019.

 

I am now editing my ts code in visual studio 2019 and open the same code in VScode to do 'pbiviz start'.

 

I wonder if I can do the editing and run 'pbiviz start' both under Visual Studio 2019?  Also is there a way that I put a breakpoints in the code and when it runs I can see my watched variable? 

  • Hi Anonymous - as a substitute for opening VS Code to run pbiviz start, you should just be able to run this from the console or PowerShell from the root directory (which is basically what the console in VS code is doing)? I use this add-in for ad-hoc stuff (which spans a PowerShell window in my project's root folder), and it seems to work fine.

    As to integrating more fully with VS, it's a Node.js/TypeScript project, so it should be possible to bind this kind of stuff in, but as the visual is compiled to and fully loaded inside the developer visual in the Power BI service rather than locally, you may not be able to attach breakpoints in the way that you might normally in VS.

    I'd be keen to hear if anyone has any alternatives, as options are always nice :)

5 Replies

  • dm-p's avatar
    dm-p
    Icon for Super User rankSuper User

    Hi Anonymous - as a substitute for opening VS Code to run pbiviz start, you should just be able to run this from the console or PowerShell from the root directory (which is basically what the console in VS code is doing)? I use this add-in for ad-hoc stuff (which spans a PowerShell window in my project's root folder), and it seems to work fine.

    As to integrating more fully with VS, it's a Node.js/TypeScript project, so it should be possible to bind this kind of stuff in, but as the visual is compiled to and fully loaded inside the developer visual in the Power BI service rather than locally, you may not be able to attach breakpoints in the way that you might normally in VS.

    I'd be keen to hear if anyone has any alternatives, as options are always nice :)

    • Anonymous's avatar
      Anonymous
      Not applicable

      dm-p  thank you for your help. 

      A separate favor to ask, I have been learning a lot from your difinity custom-visual example, much better than any other examples we had.  Do you by any chance have any other examples that binds tables in your dataview model?  thank you again.

      • dm-p's avatar
        dm-p
        Icon for Super User rankSuper User

        Thanks! Glad you're finding it useful. It's on the list to formally write it up, as there are now some big gaps for new users between the current doc and the SDK.

        When you say, "binds tables", do you mean using the table dataViewMapping? If so, I'm working on a visual right now that uses it, so I might be able to find some time to document. I'm intending to do this longer-term but there's still a bit of the visual to figure out, outside of this so it's not quite ready for game time.