The CorDapp template includes an IntelliJ run-time configuration that allows you to attach IntelliJ’s debugger to the local Corda cluster.
Currently there is a time-out issue when debugging Corda. As the local Corda cluster is a real Corda cluster, it behaves like one. Specifically, if the workers stop working, Corda detects it and errors out the flow. Unfortunately, it currently mistakes code held at a debugging point as a processor that has stopped working. As a result, although you can halt at a breakpoint and examine the stack, if you wait too long before resuming the execution of the code, it times out and the CorDapp does not continue to run as expected.
Select the DebugCorDapp run configuration.DebugCorDapp run configuration in IntelliJ
Click the Debug button.Debug button in IntelliJThe following message is displayed to indicate a successful connection:DebugCorDapp connection success in IntelliJ
Place a breakpoint next to the place in the code you want to inspect.Breakpoint added in IntelliJ
Start a flow using the Swagger UI; see Running your First CorDapp.
The CorDapp stops execution at the breakpoint and you can inspect the stack.Pause at breakpoint in IntelliJ
As described previously, if you wait too long to resume, the flow will fail. The logs will contain one or more of the following messages:
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.