Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching a Java class in terminal should not execute what is typed in the terminal #205646

Closed
testforstephen opened this issue Feb 20, 2024 · 4 comments
Assignees

Comments

@testforstephen
Copy link

Orginally reported at microsoft/vscode-java-debug#1439 (comment) by @Artur-

Type: Bug

If you type rm -rf something in the terminal and forget to press enter before launching a Java class, then your project is deleted.

image image
Expected:

The project should never be deleted, nor should anything typed in the terminal be executed

Extension version: 0.56.0 VS Code version: Code 1.86.1 (Universal) (31c37ee, 2024-02-07T09:09:01.236Z) OS version: Darwin arm64 23.3.0 Modes:

System Info

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.86.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@testforstephen
Copy link
Author

To avoid confusion, the DAP client may clear any pending commands from the terminal before launching a new app in terminal.

@meganrogge
Copy link
Contributor

If something is executed in the terminal via the Java extension, that's a bug with the extension.

@testforstephen
Copy link
Author

If something is executed in the terminal via the Java extension, that's a bug with the extension.

VS Code controls the terminal, not Java extension. Java extension only implements DAP. When the user runs or debugs a Java program, Java extension just calculates and sends the command line to VS Code through DAP protocol. VS Code copies and runs the command line in the terminal.

@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants