microsoft / microsoft/vscode-java-debug
Provide a pseudoterminal for the running/debugging console
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 591
- Forks
- 429
- Merge moyen
- 1 j 9 h
- PR mergées (30 j)
- 19
Description
The current default when running or debugging Java programs is to launch it in the integrated terminal, using a generated command that usually gets quite verbose. By setting java.debug.settings.console to internalConsole, users can get more clean output of their program, but the problem is that VS Code doesn't support user input from the debug console.
Therefore, it would be nice if the extension provided the option to launch a pseudoterminal for the program when running or debugging, which only shows the output of the program, and accepts user input. I think this is a much better user experience for most people, since the output of the program is what's important, not the full command used to launch it. Of course, that information may still be useful to some, and for debugging purposes, which is why I think the pseudoterminal should be just another option in java.debug.settings.console. Perhaps the pseudoterminal could be the default option, like in the Eclipse IDE:

I believe implementing this should be possible using the Pseudoterminal interface by passing ExtensionTerminalOptions to vscode.window.createTerminal. Then it should just be a matter of launching the java program in the background, and redirecting it's stdin/stdout to the pseudoterminal. I would have a go at implementing it myself if I had time, but unfortunately I'm quite busy with other projects right now. If anyone has time to work on this, it would be a really nice feature to have - I've heard multiple people who want a less verbose console but who also need support for stdin.
Come to think of it, you may also be able to use createTerminal with TerminalOptions instead, but without experimenting I can't quite tell whether or not it will be able to achieve the same result as a pseudoterminal. The advantage would be that it's a little easier to implement. I'm thinking it might be possible to use the JRE path for shellPath, put the JVM and program arguments in shellArgs, and then use cwd instead of generating a cd command.
Current Result
"java.debug.settings.console": "integratedTerminal"

"java.debug.settings.console": "internalConsole"

Expected Result
"java.debug.settings.console": "pseudoTerminal"

Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par localiser la gestion de java.debug.settings.console et le chemin de lancement de la console d’exécution/de débogage. Lisez les API VS Code Pseudoterminal, ExtensionTerminalOptions et TerminalOptions référencées dans l’issue. Le travail est terminé lorsqu’une option pseudoTerminal lance le programme Java avec une sortie propre tout en acceptant stdin, aussi bien lors de l’exécution que du débogage.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, typescript, vscode
- Domaine
- developer-experience, devtools
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100