- 
                Notifications
    You must be signed in to change notification settings 
- Fork 73
No‐Config Debugging
No config debugging allows you to leverage debugging features without the need for configurations in a launch.json. To use, open a terminal and type debugpy <script.py or module>. This command will invoke a debug session, and any breakpoints set in your script or module will hit.

Note: The launched debug session is attached to the script or module run in the terminal, therefore cancelling the debug session will not exit the terminal script / module.
Note: Due to conflicts in path variable, it is not possible to use no-config debugging while having the experiment
pythonTerminalEnvVarActivationon. To opt out of the experiment, add"python.experiments.optOutFrom": ["pythonTerminalEnvVarActivation"]to your User ‘settings.json`.
- 
If you see the error python3: command not foundyou may not have apython3available on thepathenvironment variable which is required for no-config debugging since thedebugpycommand ultimately runspython3in the background. Therefore, if you get this error you need to ensure that there ispython3onpath, which may require checking that the correct environment you want to use is selected or the desired virtual environment is activated in the given terminal before calling no-config debugging.
- 
If you see the error command not found: debugpythere are a few options:- Check to see if your terminal has the yellow warning label to signify the terminal is out of date, if so, reload or launch a new terminal instance.
   - Hover over the terminal instance to check that the Python Debugger extension has contributed to the terminal’s environment. If you don’t see it here, make sure your extensions are up to date and reload or try the tip below.
   - As noted, it is not possible to use no-config debugging while having the experiment pythonTerminalEnvVarActivationon. You can check to confirm you have successfully disabled the experiment with the following steps. Go to the Command Palette, run the commandDeveloper: Set Log Level, and select trace. Next select the commandPython: Show Outputand confirm you see “Experiment 'pythonTerminalEnvVarActivation' is inactive` in the logs. If not, check your settings and make sure this experiment is turned off.
 
- 
If you see a string of output including Error: either --listen or --connect is requiredin your logs, you might already havedebugpyinstalled which conflicts with this new debugging experience. Uninstalldebugpyfrom the selected environment by callingpython -m pip uninstall debugpy. The VS Code debugging experience will still work asdebugpyis bundled with the Python Debugger extension.
