79234695

Date: 2024-11-28 16:36:42
Score: 1
Natty:
Report link

The issue you’re facing occurs because the Java extension in VS Code doesn't always enforce saving the file before running it, depending on your configuration. This is a logical gap, but you can resolve it by adjusting your settings or workflows without enabling auto-save globally. Here's how to address it:

--Open File > Preferences > Settings (or press Ctrl + ,).

--Search for "Save Before Run" in the settings search bar.

--Enable the setting java.debug.saveBeforeStart:

---Go to Extensions > Java Configuration.

---Find Debug: Save Before Start and ensure it’s set to true.

This forces the Java Debugger to save all files before launching.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: CodeArtist