3

I would like to develop a web-based frontend to debug Java programs (Java 8 or higher), preferably using node.js, hence JavaScript.

I stumbled upon JPDA. There we have

  1. JVM TI, which is a native interface
  2. JDWP, which is a low-level protocol
  3. JDI, which is a Java implementation to communicate with JDWP

The first one seems not suited. For the second, I couldn't find a JavaScript library that implements this protocol. To third, I am not sure, if this is suited either.

Besides those three, it is possible to open a shell with JavaScript and use JDB there. But then parsing would be necessary and it might not be every function available.

What would be a good/easy way to communicate with the JVM and get the information?

Blob
  • 75
  • 5
  • [Web Socket](https://en.wikipedia.org/wiki/WebSocket), to talk to web server, which then runs and manages the debugger. – Andreas Dec 04 '18 at 22:11
  • And how does the server manage the debugger? – Blob Dec 04 '18 at 22:47
  • by communicating via sockets to the debugger what commands need to be run. You'll likely need to build a web server that actually opens the debugger, or at least can connect to it, so you can talk to it. Then your frontend webpage talks to that server. – Dr_Derp Dec 05 '18 at 01:27
  • I know. My question wasn't, how frontend and server can communicate. I wanted to know, what would be a good way access the debugger. Normal scokets aren't working, if they don't implement JDWP, and that is on level of bits and bytes. – Blob Dec 05 '18 at 13:06

0 Answers0