Here is how you can debug your model using vscode.
- Install python extension (The one that has more than 57 million downloads)
- Select python interpreter.
If you are using a virtual environment, select the python.exe inside of your virtual environment folder. In my case, I’m using powershell, so the path would be like, “~/pytorchEnv/Scripts/python.exe” You can select the interpreter like the image below.
- If you need to pass arguments, add that to launch.json under .vscode directory(This will be automatically created with you try to run debugging on vscode) like the image on the top of this post.
- Open the file you want to run
- Run Debugging(F5)