plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 174 forks source link

Support Java Debuggers #481

Open nybbs2003 opened 7 years ago

nybbs2003 commented 7 years ago

As in Eclipse, I can put break points and hold on execution of a Jav program and see virable value, as well as doing do in Firefox for Javascript program. However, When running Java programs in browser, I lack of respective toolchains to do things alike. What shall I use to the same task?

jimfb commented 7 years ago

In general, depending on what you're doing, it's usually easier to debug your Java program using the standard Java tools (eg. Eclipse), and then run it in doppio after having debugged it.

nybbs2003 commented 7 years ago

@jimfb Yes, that is what to do for general programs. But what if I need to debug doppio-specfic problems?

jimfb commented 7 years ago

Yeah, I agree, that's harder. AFAIK, the tooling for that doesn't exist at the moment. I just fall back to System.out.println() at that point. If you can separate the doppio-specific code from the rest of your application, you can minimize the time you spend debugging without a debugger.

jvilk commented 7 years ago

@jimfb is correct; the tooling does not exist right now. If someone wanted to add support for debuggers to DoppioJVM, the best approach would be to add support for the JVM debugging wire protocol to DoppioJVM. Then, you would be able to attach any existing JVM debugger to DoppioJVM. I've looked at the wire protocol before, and it looks very doable.

nybbs2003 commented 7 years ago

@jvilk Thanks!