-
Notifications
You must be signed in to change notification settings - Fork 173
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
[Feature Request]: Java Hot Code Replacement support #252
Comments
Sorry it's not feasible for me to support custom DAP protocol additions. I'm just one person in my spare time. This custom exetnsion to the protocol is not documented at all (I looked at the code to find that it even exists). If DAP is updated to support 'hot code replace' in a fully documented and supported way then I would consider it, but while it remains a complexly custom server-specific event, that's a rabbit hole I don't have the capacity to enter. I'm loath to open up any kind of API for custom even handling in Vimsepctor because custom events are a scourge on a standard protocol and just create work for client authors rather than enhancing the protocol centrally and sensibly. |
Cool, that's totally understandable. Thanks for your time and effort in developing and maintaining this project and hope some JVM developer can document this functionality better. |
Thanks for understanding. |
If anyone just wants this to "work" by magic, add this to def OnEvent_hotcodereplace( self, message ):
# Hack for java debug server hot-code-replace
self._connection.DoRequest( None, {
'command': 'redefineClasses',
'arguments': {},
} )
|
@puremourning Wow, terrific! Thank you! May I know if this is gonna be merged down the line? |
Possibly. No promises. |
Is your feature request related to a problem? Please describe.
I'm using Vimspector with coc.nvim, coc-java and coc-java-debug.
Right now if I change my code during debug, the code gets compiled automatically and then I can see
Unhandled event: hotcodereplace
. It'd be nice if Vimspector can handle this event and send the new class files to JVM.Describe the solution you'd like
HCR support, so that hot replacement happens wherever possible during debug.
Describe alternatives you've considered
DCEVM + Auto HotSwap. But this is usually very resource intensive as the JVM needs to watch all the class files. I'm looking at ~5x CPU usage with auto HotSwap. If I configure some
extraClassPath
s the CPU usage can further sky rockets to 20x.The text was updated successfully, but these errors were encountered: