Skip to content

Attempting to run debugger produces command line with illegal @ symbol #1312

Closed

Description

@dgh1000
Environment
  • Operating System: MacOS 10.14.6
  • JDK version: 1.8.0_151
  • Visual Studio Code version: 1.42.1
  • Java extension version: Java Extension Pack 0.8.1

The issue is that upon launching a debugger, VS Code runs this command line:

~/Sync/projects/music/music-03:cd /Users/Mike/Sync/projects/music/music-03 ; /Library
/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java
-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:58363
-Dfile.encoding=UTF-8 @/var/folders/pn/3p41p2fj14d50n707c7x2p4c0000gn
/T/cp_90sfb6m3zinsbhwyvyknqb5hv.argfile ptcs.App

And I get this error:
Error: Could not find or load main class
@.var.folders.pn.3p41p2fj14d50n707c7x2p4c0000gn.T.cp_90sfb6m3zinsbhwyvyknqb5hv.argfile

I have no idea where the command line came from... as far as I can tell, it's illegal on Mac to use an "at sign" @ in the command line, and java is trying to interpret that as the main class, so something is wrong.

VSCode Version: 1.42.1
OS Version: MacOS 10.14.6

Steps to Reproduce:

Here is a project with the issue.

music-03.zip

Create Maven project in VS Code... install all Java extensions.

Work with project for several months, making many changes. Not sure what details are significant.
Try to launch debugger in maven project, using the default launch.json. I'm not using the "current file" one, but using the (Launch) - App config.

"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch) - Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Debug (Launch)-App",
"request": "launch",
"mainClass": "ptcs.App",
"projectName": "music-03"
}
]

[provide a description of the issue]

Steps To Reproduce
  1. [step 1]
  2. [step 2]

[attach a sample project reproducing the error]
attach logs

Current Result
Expected Result
Additional Informations

Activity

  1. testforstephen commented on Mar 2, 2020

    @testforstephen
    Collaborator

    this is related with debugger for java extension, could you open an issue at https://github.com/microsoft/vscode-java-debug/issues

  2. dgh1000 commented on Mar 2, 2020

    @dgh1000
    Author

    Actually I discovered the same issue is present when you click the "run" button that appears above the main function so it's not just the debugger. I think maybe it's the test runner too. Where should I file it?

  3. testforstephen commented on Mar 2, 2020

    @testforstephen
    Collaborator

    The "run" button is added by the debugger. Opening an issue at java debugger is enough, i'll take a look at there.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions