vscode-maven
vscode-maven copied to clipboard
Do not ask to save a currently open .class file when launching in debug mode
Describe the bug
If you have a .class file open when launching e.g. a Maven target in debug mode, VS Code popups up a dialog that asks you to save the current .class
file which is in a JAR file.
I rarely want to save .class
files
To Reproduce Steps to reproduce the behavior:
- Open a Maven Java project
- cmd-t -> e.g.
#String
- Launch a Maven target in debug mode
Expected behavior No popup
Environments (please complete the following information as much as possible):
- OS: [e.g. Windows 10/Linux/OS X] mac Big Sur
- VS Code version: [e.g. 1.24.0] 1.60.2
- Extension version [e.g. 0.9.0] 0.34.0
Screenshots
Redirected here from https://github.com/redhat-developer/vscode-java/issues/2131
Launch a Maven target in debug mode
Can you specify how did you "launch a maven target"? Pressing F5? or executing command from "Maven Project" explorer? or run something from terminal?
@testforstephen please take a look if it's related to debugger.
Right click and "debug" on the Maven goal in the "Maven" panel in the "Explorer" tab
this behavior is from VS Code platform. But there is a setting to allow you to customize the behavior. For example, you could disable it via the setting "debug.saveBeforeStart": "nonUntitledEditorsInActiveGroup"
.
That setting seems to deal with the problem but it also prevents VS Code from asking to save any untitled editors before launching, as the setting says
That setting seems to deal with the problem but it also prevents VS Code from asking to save any untitled editors before launching, as the setting says
I'm using "nonUntitledEditorsInActiveGroup" and works for me. Does it meet your needs?