You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matthew Beech edited this page Mar 12, 2025
·
4 revisions
Set up the Python debugger in VS Code.
Select Run > Add Configuration from the VS Code menu bar.
Select Python, and then Module, and enter the name of the module you want to debug, e.g. silnlp.nmt.translate.
Edit configuration.
Add the option "console": "integratedTerminal"
Change "justMyCode" to "false"
Add "args": [] and fill the list with the arguments needed to run the module. See example below.
(Optional) To change or add environment variables for the duration of the debugger run, add "env": {} and put any variables you want in the dictionary. See example below.
(Optional) Change "name" to match the module
To run, open the Run and Debug tab in VS Code (Ctrl+Shift+D), select a module at the top, and click the play button.