Project

General

Profile

How to Debug Z2 » History » Version 1

Henning Blohm, 08.03.2014 22:35

1 1 Henning Blohm
h1. How to Debug Z2
2
3
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). 
4
5
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_). 
6
7
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*.
8
9
See e.g. https://redmine.z2-environment.net/projects/z2-base/repository/base/revisions/master/entry/environment/webWorker.properties for the z2-base.base defaults. The property @worker.debug.port@ defines the debug port.
10
11
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).
12
13
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.