How to Debug Z2

Typically debugging Z2 means to attach a debugger via remote debugging. The only exception to that is when using Z2 as an embedded runtime (see the documentation).

If got this far, you should know a bit about Z2's worker processes. There is typically at least one <home> process and one worker process (e.g. environment/webWorker or simply webWorker).

All Web application logic is run by the webWorker and that's where you typically want to debug. The debug port is part of the worker process configuration. The default for the webWorker is port 5100.

See e.g. for the z2-base.base defaults. The property worker.debug.port defines the debug port.

So, the short answer to How can I debug my Web app with Z2 is to attach a Debugger (e.g. Eclipse) to port 5100 on the machine running the webWorker (most likely localhost in development).

Unless you are using the Gateway feature (see How to Gateway) this is also the definite answer. Otherwise the instance number of the worker process (appended to the worker process component name after the (AT) symbol), needs to be added to the default port from above.