Introduction
It took me a while to figure it out how to debug with Visual Studio Code when you have an argument in the code. These are the steps : First set a breakpoint, go the "Run and Debug Pane" and then file in the parameter.
We are building upon what we already have :
- Databricks series : Starting a new python project in Visual Studio Code (Part I)
- Databricks series : setting up a connection to Databricks from local IDE (Part II)
- Databricks series : Setting up a Databricks project in Visual Studio Code (part III)
- Databricks series : Deployment from Visual Studio Code (Part IV)
- Databricks series : Execute the job in Databricks (Part V)
- Databricks series : A configrable framework in Databricks (Part VI)
- Databricks series : Loading strategies in Databricks (Part VII)
- Databricks series : Data contracts in Databricks (Part VIII)
Breakpoint
Click on the screen left from the code window and a red appears
This is the breakpoint.
Run and Debug window
Next step is to go the 'Run and Debug' Pane. This is the Icon on the left with a play symbol and debug on top of that.
Click in Run and Debug:
Choose Python File with Arguments, and the following "Command Line Arguments" window appears





Geen opmerkingen:
Een reactie posten