microsoft / microsoft/vscode-java-debug

Provide a pseudoterminal for the running/debugging console

Đang mở
#906 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

ai-triaged enhancement feature request terminal
Ngôn ngữ chính
TypeScript
Star
591
Fork
429
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
19

Mô tả

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:
eclipse-console

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"
current-console

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

Expected Result

"java.debug.settings.console": "pseudoTerminal"
expected-console

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần xử lý java.debug.settings.console và đường dẫn khởi chạy console chạy/gỡ lỗi. Đọc các API Pseudoterminal, ExtensionTerminalOptionsTerminalOptions của VS Code được tham chiếu trong issue. Công việc được xem là hoàn tất khi một tùy chọn pseudoTerminal khởi chạy chương trình Java với đầu ra sạch và chấp nhận stdin cho cả chạy và gỡ lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, typescript, vscode
Lĩnh vực
developer-experience, devtools
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.