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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Resolver I
Resolver I

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.

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/

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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.