You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure where to post questions or discussions on this extension so I'm just creating an issue. Please let me know where I should ask questions in the future.
Questions & Notes
Is it possible to run the debugger on a single file? In school, I often find myself writing many Java files in the same project to solve certain exercises. All of these classes have nothing to do with one another, and they all have their own entry point/psvm method. When I attempt to launch the debugger, it tells me that I must specify the entry point to use. This is a great feature, but it would be nice to have a way to just debug the current file instead of having to change the entry point each time. If there is an easy way to debug a single file, I would love to hear it.
Is there a way to exclude certain files from the java debugger?
We are lacking a Discussion tab so an issue is, at the moment, the best place where to ask.
Rust has implemented in the runnable an option to run or debug, we could implement the same. This would allow you to easily start a debugging session without explicitly updating the entry point.
With excluding, what do you mean exactly? Skipping the file while debugging? I don't think that's possible but my experience with the java debugger is limited hence there could be the option but I've never seen it. Do you by any chance have examples of IDEs doing it?
It will allow you to have the debugger start with the current selected file as argument. Sadly integrating the debugger along with the runnable seems to be limited to core languages for now in Zed. This is the best workaround I've found.
Thank you for the quick and helpful response! I think having a debug option in the runnable section would be awesome! The work around you came up with works great for the time being though!
What i meant by excluding was for the debugger to not step into things like builtin methods. I noticed with methods like .get(), the debugger would take multiple steps on this line instead of a single step.
Activity
tartarughina commentedon Jan 22, 2026
Hey @lukejans
We are lacking a
Discussiontab so an issue is, at the moment, the best place where to ask.excluding, what do you mean exactly? Skipping the file while debugging? I don't think that's possible but my experience with the java debugger is limited hence there could be the option but I've never seen it. Do you by any chance have examples of IDEs doing it?tartarughina commentedon Jan 22, 2026
If you're working a lot with single file debugging you can try the following config for
debug.json[ { "label": "Debug $ZED_STEM", "adapter": "Java", "request": "launch", "mainClass": "$ZED_STEM", "build": { "command": "javac -d . $ZED_FILE", "shell": { "with_arguments": { "program": "/bin/sh", "args": ["-c"] } } } } ]It will allow you to have the debugger start with the current selected file as argument. Sadly integrating the debugger along with the runnable seems to be limited to core languages for now in Zed. This is the best workaround I've found.
lukejans commentedon Feb 9, 2026
Thank you for the quick and helpful response! I think having a debug option in the runnable section would be awesome! The work around you came up with works great for the time being though!
.get(), the debugger would take multiple steps on this line instead of a single step.tartarughina commentedon Feb 9, 2026
@lukejans that's a behavior coming from the debugger itself, we do not have a way to change it or offer the option to personalize it.
You should try using the option
Step overrather than just executing the next step in the call stack.tartarughina commentedon Mar 6, 2026
I've added the single file debugging to the README, the issue can be considered completed