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

"Run without debugging" in vscode starts the jvm in debugging mode #6239

Open
kostaskougios opened this issue Mar 20, 2024 · 1 comment · May be fixed by #6306
Open

"Run without debugging" in vscode starts the jvm in debugging mode #6239

kostaskougios opened this issue Mar 20, 2024 · 1 comment · May be fixed by #6306
Assignees
Labels
debug DAP debug related tickets improvement Not a bug or a feature, but something general we can improve

Comments

@kostaskougios
Copy link

Describe the bug

I've created a run config:

    {
      "type": "scala",
      "request": "launch",
      "name": "TroopsApp",
      "mainClass": "troops.troopsApp",
      "args": [],
      "env": {}
    }

When I try to run it with "Run without debugging" (ctrl-f5), the jvm starts in debugging mode.

Note: if I go to my main() class and click the "run" lense, it runs differently and not in debugging mode.

It may be a vscode behaviour, seems there is a lot of similar issues in other languages, https://www.google.com/search?client=firefox-b-d&q=vscode+%22run+without+debugging%22+always+starts+in+debugging+

Also seems tests run always in debugging mode. I've some scala tests that run a lot slower within vscode compared to running them from sbt.

Expected behavior

start the jvm without debugging

Operating system

macOS

Editor/Extension

VS Code

Version of Metals

v1.29

Extra context or search terms

No response

@tgodzik
Copy link
Contributor

tgodzik commented Mar 22, 2024

Thanks for reporting! Looks like we don't use the same mechanisms when running via launch.json. I was sure that was already fixed, but I need to actually take a look.

@tgodzik tgodzik self-assigned this Mar 25, 2024
@tgodzik tgodzik added debug DAP debug related tickets improvement Not a bug or a feature, but something general we can improve labels Mar 25, 2024
@tgodzik tgodzik added this to Triage in Metals Issue Board via automation Mar 25, 2024
@tgodzik tgodzik moved this from Triage to In progress in Metals Issue Board Mar 25, 2024
tgodzik added a commit to tgodzik/metals that referenced this issue Apr 14, 2024
Previously, it was not possible to get a command to run if one only input the main class name. Now it works the same as a discovery of main class to run within a file.

Fixes scalameta#6239
tgodzik added a commit to tgodzik/metals that referenced this issue Apr 14, 2024
Previously, it was not possible to get a command to run if one only input the main class name. Now it works the same as a discovery of main class to run within a file.

Fixes scalameta#6239
tgodzik added a commit to tgodzik/metals that referenced this issue Apr 14, 2024
Previously, it was not possible to get a command to run if one only input the main class name. Now it works the same as a discovery of main class to run within a file.

Fixes scalameta#6239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug DAP debug related tickets improvement Not a bug or a feature, but something general we can improve
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants