Visitar URL original
Incorrect/previously supplied command line arguments being used during run/debug · Issue #1555 · microsoft/vscode-java-debug · GitHub
Skip to content

Incorrect/previously supplied command line arguments being used during run/debug #1555

Description

Hello, I am running a simple App (repo) that accepts command line arguments. When I perform multiple runs, it somehow reuses previously supplied values and ignores lates values entered in the prompt.

Image

Screen recording here:- https://drive.google.com/file/d/1Awg2xhSF1QustYl3mdWztcYp0c9SKU36/view?usp=sharing

VS Code info

Version: 1.100.0 (Universal)
Commit: 19e0f9e681ecb8e5c09d8784acaa601316ca4571
Date: 2025-05-07T12:48:53.763Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin x64 24.4.0

Java

java version "24.0.1" 2025-04-15
Java(TM) SE Runtime Environment (build 24.0.1+9-30)
Java HotSpot(TM) 64-Bit Server VM (build 24.0.1+9-30, mixed mode, sharing)

Activity

  1. github-actions commented on Nov 10, 2025

    @github-actions

    Hi Bhawana Gupta (@bhgupta01), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.

    • Use the built-in args array syntax in your launch.json instead of a single string. For example:

      {
        "type": "java",
        "name": "Run",
        "request": "launch",
        "mainClass": "${file}",
        "args": ["add", "brush teeth"]
      }
    • If you’d rather be prompted on every launch, use the SpecifyProgramArgs command:

      {
        "type": "java",
        "request": "launch",
        "mainClass": "${file}",
        "args": ["${command:SpecifyProgramArgs}"]
      }
    • The Java Debugger writes arguments into a temporary .argfile. To force it to pick up your latest changes, either restart VS Code or manually delete the generated .argfile (shown in your terminal’s -argfile path) before re-running.

    • Make sure you’re on the latest Java Debugger and Language Support for Java extensions—there have been fixes around argument handling.

    Other references with high confidence worth checking:

    The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions