How do I Connect VSCode to Dataiku for debugging (2026 edition)

Jason
Jason Registered Posts: 44 ✭✭✭✭✭

I considered naming this question YAVSCQ (Yet another VSCode Question) considering how many other threads are out there, but for whatever reason, I'm unable to get it working.

Background: I've been using PyCharm with the Dataiku plugin for years, and it has worked very well. I wanted to look at setting up VSCode to work in a similar way (to debug python recipes). In principle VSCode has more access to Dataiku assets (like the wiki) that are not available in PyCharm. I have searched and read the following posts:

https://community.dataiku.com/discussion/57/dataiku-dss-integrates-with-vscode
https://rymoore.medium.com/integrating-dataiku-and-visual-studio-code-for-python-development-2b9096719b36
https://developer.dataiku.com/latest/tutorials/devtools/using-vscode-for-code-studios/index.html#gsc.tab=0
https://developer.dataiku.com/latest/getting-started/getting-started/vscode-extension/index.html#gsc.tab=0
https://community.dataiku.com/discussion/7905/debug-plugin-code-using-visual-studio

The crux of my problem is this: I can connect VSCode to dataiku, and I can see projects. I can see recipes, and I can open them. I have opened a project folder and I've created a venv with the appropriate libraries including pandas, numpy, dataiku, and the dataiku-api-client. All of this is verifiably in the environment. However, when I try to run debug in VSCode, it continually tries to use the global interpreter on my workstation (python 3.14) rather than the venv python version (3.11) which is required by my project. I have tried repeatedly to change the interpreter and it says that 3.11 is already the currently selected interpreter, but still it won't get past the first line of "import dataiku". I can see in the actual debug startup that it is using the wrong version of Python, I just have no idea how to change it.

I'm not a regular VSCode user, so I could be missing some obvious solution, here, but I'm running out of places to ask: I have googled it. I have asked Gemini, I have asked Copilot, and in all desperation, I have even asked Cobuild.

That last part is a little scary. Here is what I asked Cobuild after it advised me to use external git to pass files back and forth (despite the fact that this code is already covered by the internal git in DSS:


This all sounds very complicated. I have been using the DSS plugin for PyCharm for years, and it is working well. It automatically syncs files with DSS and allows me to build run configurations for them with little effort. Why is VSCode so much more difficult to work with?

Cobuild answered:

Because the PyCharm and VS Code integrations are built around different models.

The Dataiku PyCharm plugin is designed for the workflow you describe: it treats DSS project code as remotely synchronized source, provides DSS-aware run configurations, and bridges much of the DSS runtime context. That makes local editing/debugging feel close to working with ordinary local files.

The VS Code experience is typically less integrated:

The DSS extension exposes project files through a remote/virtual workspace rather than necessarily creating a normal local checkout.
VS Code’s Python debugger chooses an interpreter for a local workspace file, not for a DSS-backed virtual file.
A DSS Python recipe needs runtime context—project key, recipe input/output bindings, dataset locations, variables, managed folders, etc.—that standard VS Code debugging does not automatically recreate.
The VS Code extension may support editing and synchronization, but it does not necessarily provide the same DSS-aware run-configuration and local recipe emulation capabilities as the PyCharm plugin.
So the problem is not that your venv is wrong. You are encountering a difference in integration maturity and design: the PyCharm plugin handles remote synchronization plus recipe-aware execution/debugging; VS Code generally requires either a local workspace/harness or a separate Git-backed workflow.

Practical recommendation
If the PyCharm plugin already gives you reliable sync and easy local debugging, continue using PyCharm for recipe development and debugging. There is no technical benefit in moving that workflow to VS Code unless your organization specifically requires it or you need VS Code-only tooling.

Use VS Code if you primarily want:

editing/syncing project code,
linting and static analysis,
Git workflows with an external repository,
local development of standalone modules or applications.
For direct, low-friction debugging of DSS recipes, PyCharm is likely the better choice in your current setup.

Any help or suggestions would be appreciated. Thanks!

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,728 Neuron

    There are a couple of different ways to invoke the debugger in VS Code. Exactly what steps are you following? Describe exactly where you click and which interpreter you see in the bottom right.

  • Jason
    Jason Registered Posts: 44 ✭✭✭✭✭

    From a clean open on VSCode, with no workspace active, I can click the dataiku plugin and browse to my project. I open recipes and single click the recipe I am interested in debugging. (Notably at this point, if I click away from the recipe, it disappears from the editor, it is not persistent. This is frustrating if I need to debug the interaction between a recipe and a library item).

    At this point, in the bottom right corner I see python 3.14, and this is expected because I haven't built an environment yet. So to build an environment I first create a folder to house the project, I create a requirements.txt (from the project's default environment on the server), and then use the VSCode environment manager to build a venv. It automatically detects my requirements.txt and builds the environment from there. I then manually add the dataiku-internal-client library using the trusted host flag (because we run a self-signed cert), and the dataiku-api-client library. using a terminal that shows that the .venv I have built is active. At this point just to be sure everything is permanent, I save the workspace.

    At this point I expect I should be able to run my recipe locally. I use the dataiku plugin to locate the appropriate recipe, and it appears in the editor window. In the bottom right corner of the window, I see python 3.14 (the wrong version). I click it and see a list of environments. At the top and listed as recommended I see the correct 3.11 version. I click it and I get a "helpful" note saying that 3.11 is already the selected environment for my workspace. However, the version shown in the most bottom right is still 3.14. I have yellow underlines on all the import statements that should be present but aren't being seen.

    A co-worker of mine discovered this morning that the likely cause is that the dataiku plugin is not opening the code in the correct location for it to be seen as part of the workspace. It is instead located in c:[redacted]/AppData/Roaming/Code/user/globalStorage/dataiku.dataiku-dss/[PROJECT_KEY]/RECIPES and that this is the likely cause.

    Navigating back to the project explorer and adding that folder to the workspace then seems to help. After doing so, then clicking the interpreter button in the bottom right then pulls up two options in the quick access bar. One is the main workspace, and one is the recipe folder I just added. If I pick the recipe folder, then pick the correct interpreter, it finally changes the interpreter in the bottom right, and almost all the yellow lines disappear. The few imports that still show warnings are those that are trying to include libraries from the dss code library for this project. If I attempt to debug now, it of course fails on the missing library code.

    When I try this same trick (adding the folder location where the library files download to, which by the way is a wholly different path) there is no folder depth I can pick which seems to satisfy the import statements. It doesn't ever recognize them. I even added the folder at the dataiku.dataiku-dss folder level and specifically added the lib/[PROJECT_KEY]/python folder as an "extra folder" and now the underlines are no longer flagging my project library files, but when I debug, it still throws an exception saying the module cannot be found.

    The worry I have, is that I'm still going down the wrong path, because none of these last few steps are documented by anyone else doing this, so I really don't feel like I'm going the right way with this solution.

    Thanks,
    Jason

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,728 Neuron
    edited November 13

    Hi Jason, your message is a bit too long for me to digest but I can say the following. There are basically two fundamental ways to debug Python code in VSCode: one is to debug a Python project and the other is to debug a Python. I suggest you ask your LLM of choice to explain how to invoke the two modes so you understand the difference. In general for Dataiku Python recipes you want to debug a file since Python recipes are sort of stand alone Python scripts.

    Then the other thing I will suggest is to move away from local VSCode and invest the time required to integrate Dataiku with your Kubernetes of choice (we use EKS in AWS) and build Dataiku Code Studios with VSCode Web. You can easily add Python code environments to Dataiku Code Studios templates and the required images can built automatically in the latest Dataiku version. This assures you have a true replica of the Python code env in DSS and that code env changes are replicated in your Dataiku Code Studios templates. The extra work required to integrate Dataiku with your Kubernetes really pays off since it allows you offload compute to a fully scalable platform and allow any other user to use your Dataiku Code Studios for Python debugging, not just yourself. Whereas your current solution of running VSCode locally requires every user to perform and maintain a complex local setup. Once setup Dataiku Code Studios are effectively zero client setup and and you can serve unlimited number of users.

Setup Info
    Tags
      Help me…