Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[hono-dev] How to debug Hono-code

Hi Kai & hono-devs,

I need some help. I am trying to step-through the http adapter code using the eclipse built-in debugger. I want to see internally what happens when a http client tries to upload telemetry data (from the point when the client made the request until the point where the AMQP 1.0 message is sent to the telemetry endpoint).

The test case am considering is testPostTelemetrySucceedsForValidCredentials(...) of the VertxBasedHttpProtocolAdapterTest

The problem that I am facing is that the debugger times out and as a result terminates after a short time. During setting up the adapter, I tried doing the ff:

1. Using Long.MAX_VALUE as the max value for the event-loop execution time
VertxOptions options = new VertxOptions().setMaxEventLoopExecuteTime(Long.MAX_VALUE);
vertx = Vertx.vertx(options);
...

2. Set the adapter as a worker thread:
vertx.deployVerticle(httpAdapter, new DeploymentOptions().setWorker(true), ctx.asyncAssertSuccess());

In both setups, the debugger times out before i reach the AbstractVertxBasedHttpProtocolAdapter#doUploadMessage(..) method

How can I work around this problem so that I have a lot of time before the debugger times out? how do you debug hono code?

kind regards
--
alfu

Back to the top