microsoft / vscode-python-debugger

Python debugger (debugpy) extension for VS Code.
https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy
MIT License
57 stars 24 forks source link

Why do I have to click two times to start debugging? #255

Closed prokie closed 7 months ago

prokie commented 7 months ago

This is my launch.json

{
  "configurations": [
    {
      "name": "Python: Current file",
      "type": "debugpy",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal",
      "justMyCode": false
    }
  ],
  "version": "0.2.0"
}

I think before I could just click this button to start debugging. image

But now I also have to select here afterwards image

Can I configure it to just run in one step? Why is Node.js showing here?

paulacamargo25 commented 7 months ago

Hi @prokie thats a new functionality that we implemented, you can still use the old one. Click the arrow next to the run and debug button, and select Python Debugger: Debug Python File.

Screenshot 2024-03-07 at 2 06 07 PM

Thanks

prokie commented 7 months ago

But if I use Python Debugger: Debug Python File it does not use my launch.json. I need to use that one where "justMyCode: false". Is there no way to configure the launch.json to be default?

paulacamargo25 commented 7 months ago

Yes, you can add "purpose": ["debug-in-terminal"] to your launch.json config, in order to use this configuration for that button. You can see the documentation here