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

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
sllewji
Regular Visitor

Using the Fabric API in a Fabric Notebook with the synapse Visual Studio Code Extension

Hi,

I have some PySpark code in a Fabric Notebook which uses the Fabric API to manage shortcuts in a Lakehouse.

I would like to be able to debug this code using the Synapse Visual Studio Code Extension.

However, having setup up Visual Studio Code with the necessary prerequisites, I find that the code is erroring at functions which use MSSparkUtils in the NotebookUtils library.

Whilst I understand that this library is not suitable for local installation, I had expected (hoped?) that calls to it would be redirected to a remote Spark Pool.

As a very new comer to things Fabric, Spark and even Python I wonder whether anyone else might have some experience that they would be willing to share as to whether the VS Code extension should, or possibly at some stage will, be able to support this requriement?

 

Edit: I should mention that the original Notebook code runs fine within Fabric itself, just not via the VS Code extension.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sllewji 

 

Aside from the old thread below, I couldn't find any other documents or materials mentioning this limitation.

Solved: "import notebookutils" via VSCode on remote Spark ... - Microsoft Fabric Community

 

According to the above thread and the testing results, the notebookutils module is still not supported in VS Code for the Synapse extension currently. This feature is probably on the roadmap and will be available in future versions, but there is no ETA for its release yet. 

 

However if you still want to experience with the notebookutils module in VS Code, you might try the VS Code (Web). This is a preview feature now. In my testing, it supports the notebookutils module. 

vjingzhanmsft_0-1729134069553.png

 

To learn more about this preview feature, please read Create and manage Fabric notebooks from VS Code for the Web - Microsoft Fabric | Microsoft Learn

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @sllewji 

 

Aside from the old thread below, I couldn't find any other documents or materials mentioning this limitation.

Solved: "import notebookutils" via VSCode on remote Spark ... - Microsoft Fabric Community

 

According to the above thread and the testing results, the notebookutils module is still not supported in VS Code for the Synapse extension currently. This feature is probably on the roadmap and will be available in future versions, but there is no ETA for its release yet. 

 

However if you still want to experience with the notebookutils module in VS Code, you might try the VS Code (Web). This is a preview feature now. In my testing, it supports the notebookutils module. 

vjingzhanmsft_0-1729134069553.png

 

To learn more about this preview feature, please read Create and manage Fabric notebooks from VS Code for the Web - Microsoft Fabric | Microsoft Learn

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Hello Jing - Thanks for taking the time to reply. My google-Fu is clearly not up to par with yours!

It is good to hear that you have had success with the VS Code (web), unfortunately my experiences have been unsuccessful so far, but I will try again

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.