Skip to content

Show compiled templates in debugger - #456

Merged
ExE-Boss merged 1 commit into
mde:masterfrom
5im-0n:debug
Sep 10, 2019
Merged

Show compiled templates in debugger#456
ExE-Boss merged 1 commit into
mde:masterfrom
5im-0n:debug

Conversation

@5im-0n

@5im-0n 5im-0n commented Sep 5, 2019

Copy link
Copy Markdown
Contributor

This commit adds a sourceURL directive to the generated template function.
This makes generated template code visible in the debugger.
See https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources

When loading templates dynamically in the browser (for example using ejs-render-remote) this simple addition is really useful:

firefox_80pYTdTkkL

This commit adds a sourceURL directive to the generated template function.
This makes generated template code visible in the debugger.
See https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Debug_eval_sources
@mde

mde commented Sep 5, 2019

Copy link
Copy Markdown
Owner

Very nice, thanks!

@ExE-Boss

ExE-Boss commented Sep 6, 2019

Copy link
Copy Markdown
Collaborator

The next step would probably be to generate a source map as well.

@ExE-Boss
ExE-Boss merged commit 09c0f51 into mde:master Sep 10, 2019
@5im-0n
5im-0n deleted the debug branch October 11, 2019 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants