Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
RichFlorida
Helper V
Helper V

Using Visual Studio Code to write M Code

I'm a novise in this subject.

 

I'm trying to use VS Code to write and debug M-code for my PowerBI Report.

 

How can I make VSC IDE communicate with the Power BI dataset to be able to see the Power BI tables and columns in VSC?

 

Thanks

4 REPLIES 4
pcoley
Super User
Super User

The PowerQuery M Language provides features like syntax highlighting, code formatting, and IntelliSense. The official Microsoft tools also include a Power Query SDK for custom connector development.
But it does not allow you to run or debug the M code directly within VS Code itself. The code must still be executed within a Power Query host environment, such as Power BI Desktop or Excel. 

I think you can have a better resolution using MCP: 
https://marketplace.visualstudio.com/items?itemName=analysis-services.powerbi-modeling-mcp



I hope this helps. if so please accept as a solution. Kudos are welcome.

If I helped solve your problem, mark this post as a solution.
Kudos are Welcome! | AI assisted for clarity of wording. |

i realize that you are trying to see and play with the data in the same ide.
Then please try with:
https://www.sqlbi.com/tools/dax-studio/

If I helped solve your problem, mark this post as a solution.
Kudos are Welcome! | AI assisted for clarity of wording. |
v-jingzhang
Community Support
Community Support

Hi @RichFlorida 

 

You may have a look at this tool Power Query / M Language - Visual Studio Marketplace

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Thanks very helpful 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors