How can I get the logs of a Drone plugin?

I have read the documentation. It suggests running the plugin under terminal or enabling verbose debug in .drone.yml. However, the former way does not work for me because the plugin I am trying to debug relies on the previous build steps. I don’t know to get the logs of the plugin with docker logs either because the container of the plugin is removed immediately after running.

Any tips?

Edit: I have solved the problem and the root cause is embarrassing. So, this post can be removed.