[英]Debugging and tracing RxJava with lambda, Intellij IDEA
I am working in a project which written entirely using lambda
expressions, and to make things harder, it mixed with RxJava
, I included a very simple piece of that code 我正在一个项目中工作,该项目完全使用
lambda
表达式编写,为了使事情变得更困难,它与RxJava
混合使用,其中包括了一个非常简单的代码
return tokenExchangeClient.requestToken(identity)
.doOnError( e -> logError(e,TOKEN_REQUEST_FAILED))
.map(AccessTokenResponseModel::getAccessToken)
.flatMap(token -> paymentAdapter.initiatePayment(paymentRequest, token))
.doOnError(e -> logError(e,PAYMENTS_POST_FAILED))
.flatMap(InternalToExternal::convertToTransferInitiationResponse);
How can I debug and trace this lambda
with RxJava
like the old and simple java days ? 我如何像以前的Java天一样使用
RxJava
调试和跟踪此lambda
?
Just place a breakpoint at the beggining of the lambda and run the project in debug mode, then when the debug stop in the breakpoint you can press the " F8 " key to go step to step in the lambda. 只需在lambda的开始处放置一个断点,然后以调试模式运行项目,然后当调试在该断点处停止时,您可以按“ F8 ”键逐步进入lambda。
I'll link you the official documentation about breakpoints > https://www.jetbrains.com/help/idea/using-breakpoints.html 我将为您链接有关断点的官方文档> https://www.jetbrains.com/help/idea/using-breakpoints.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.