microsoft / microsoft/vscode-python-debugger

Support file base name substitution in `module` configuration in `launch.json`

Offen
#86 9 Kommentare 27 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@janicezyt arbeitet bereits daran.

Seit 22.9.2023.

feature-request good first issue needs PR
Vorherrschende Sprache
TypeScript
Sterne
180
Forks
126
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
3

Beschreibung

Environment data

  • VS Code version: 1.33.0
  • Extension version: 2019.3.6558
  • Python version: Python 3.6.7 (miniconda)

Feature Suggestion

It would be great to be able to debug arbitrary files as modules without having to hardcode their path in launch.json. The best I could find was the following which at least allows to debug any file in a given directory as module.

{
  "configurations": [
    {
      "name": "Python: Module",
      "type": "python",
      "request": "launch",
      "module": "src.nn.models.${fileBasenameNoExtension}"
    }
  ]
}

Not sure if this can be done by the Python extension or would have to be implemented by VS Code itself, but basically I'm suggesting something similar to ${fileBasenameNoExtension} that returns the full dotted "path" to a file from a project's root?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.