Setting shortenCommandLine "argfile" should not nest a user-passed argfile inside an argfile
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java, typescript, vscode
Rechercherichtung
Beginne mit der Java-Startkonfiguration unter Verwendung von vmArgs, shortenCommandLine und der vom Benutzer erstellten Datei myargs, und reproduziere anschließend den Fehler mit den bereitgestellten Hello-World-Schritten. Verfolge, wie der Debugger die temporäre Argfile erstellt; abgeschlossen ist die Aufgabe, wenn das Programm ausgeführt wird, ohne die vom Benutzer übergebene Argfile zu verschachteln.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
When setting shortenCommandLine to argfile (or setting to auto and then triggering the argfile behavior with a long command), VS Code will always put any vmArgs inside an argfile, even if the only VM arg is another argfile. This breaks run configurations that pass a user-generated argfile that still trigger the automatic CLI shortening behavior such as a very long classpath, since argfiles cannot be nested.
Environment
- Operating System: Linux
- JDK version: 17
- Visual Studio Code version: 1.84.0-insider (
60182c7e1a666961ded4d0319c154f52d85daf30) - Java extension version: v0.25.15
- Java Debugger extension version: v0.54.0
Steps To Reproduce
- Create a trivial Java project ex. a Hello World main method
- Create an argfile
myargs - Create
launch.jsonwith a corresponding run configuration for the main method. SetshortenCommandLinetoargfileto force the argfile behavior (should be equivalent to settingautoand then loading a very long classpath).
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Hello",
"request": "launch",
"mainClass": "Hello",
"vmArgs": "@myargs",
"shortenCommandLine": "argfile"
}
]
}
- Attempt to run the main method - this should fail.
Sample project: test-argfile.tar.gz
Current Result
$ /usr/bin/env /path/to/jdk @/tmp/cp_7ifzraqswz8cni6w2z8m6nw3w.argfile Hello
Error: Could not find or load main class @myargs
Caused by: java.lang.ClassNotFoundException: @myargs
/tmp/cp_7ifzraqswz8cni6w2z8m6nw3w.argfile contents:
@myargs -XX:+ShowCodeDetailsInExceptionMessages -cp "/home/justinw/.vscode-server-insiders/data/User/workspaceStorage/-2d922411/redhat.java/jdt_ws/test-argfile_31bc6c61/bin"
Expected Result
Program should execute and argfiles should not be nested
Additional Informations
- Vorherrschende Sprache
- TypeScript
- Sterne
- 591
- Forks
- 429
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 19
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/vscode-java-debug
-
ai-triaged bug
microsoft/vscode-java-debug#1703 · 1 Kommentar · 1 Reaktion · 1 zugewiesene Person ·
-
ai-triaged enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
microsoft/vscode-java-debug#1689 · 2 Kommentare ·
-
ai-triaged bug
microsoft/vscode-java-debug#1666 · 1 Kommentar · 1 zugewiesene Person ·
-
ai-triaged bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
microsoft/vscode-java-debug#1658 · 1 Kommentar ·
-
ai-triaged enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
microsoft/vscode-java-debug#1628 · 3 Kommentare ·
Alle Issues in microsoft/vscode-java-debug
Ähnliche Issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Mend: dependency security vulnerability untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100