How can I debug my own transformer

How can I debug a (custom) transformer using a debugger in DartEditor.

I tried using the transformer shown at http://dovdev.com/smoke-and-mirrors/ , but it does not work.

I checked these docs but couldn't find anything about debugging.

+6
source share
1 answer

Since the pub starts transformers in its process, internally isolates and does not redirect stdout transformers, it is quite difficult to debug it from the pub itself, so the best option is to start the transformer outside the pub by setting up a barbar environment along with the mocked files.

The code_transformers package facilitates this. See his test library: http://www.dartdocs.org/documentation/code_transformers/0.2.3+1/index.html#code_transformers/code_transformers-tests

+2
source

Source: https://habr.com/ru/post/976285/


All Articles