Add breakpoint place clean way

Hi, i’m trying to develop a debugger for python.

My main problem is create a place, for each line of a python source, where the user can click to add the breakpoint (like in any IDE).

I read the API doc, tryied some way.
Injecting directly in the TextEditor view the html code worked, but when i scroll a medium-great file (e.g. 200 rows) i see that lines that were not visible are not modified; so i understood that this is not the way because lines are buffered or somethig similar.
I tried to use Marker; this works (adding a class) for all selected lines but:

  • there is a clan way to decorate all, already written and to be added, lines?

  • can i set a callback?

I guess this is not the correct road.

I cannot find some way reading API out of these.
I tried to read other plugin, such as linters, but i havan’t usefull suggestions.
Some suggestion on the approach to follow?
I particularly appreciate a way that is in some way consinstent with the code style that the API suggest.
I appreciate in the same way some link to documentation richer than the official for these kind of tasks.