Description
Hi,
I think this could be a great thing if, in a debug mode, Brython provides a source map that'd help debugging in the browser:
- https://developer.mozilla.org/en-US/docs/Glossary/Source_map
- https://tc39.es/ecma426/2024/#mappings-structure
This seems to be working quite well for languages other than JS:
It seems that if we use createObjectURL
, the source map may be lazy evaluated.
Hence, we might be able to create the source map only when asked.
https://forweb.dev/en/blog/2020-05-05-object-url/
I really do not have the time to test it now, but that'd be nice if somebody could take a look at it.
Note: related to #2476
Note: https://tc39.es/ecma426/2024/#base64-vlq
EDIT: This seems quite easy to implement. Understanding the specs is a little harder ^^.
Note : breakpoint to test
breakpoint()
https://www.digitalocean.com/community/tutorials/python-breakpoint
I may implement it in the train in a few days ^^.
Cordially,