microsoft / microsoft/vscode-python-debugger

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

Aperta
#86 9 commenti 27 reazioni 1 assegnatario Vedi su GitHub

@janicezyt ci sta già lavorando.

Dal 22/9/2023.

feature-request good first issue needs PR
Lingua principale
TypeScript
Stelle
181
Fork
126
Merge medio
2g 3h
PR unite (30g)
3

Descrizione

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?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.