RazorEngineCore icon indicating copy to clipboard operation
RazorEngineCore copied to clipboard

Added the ability to debug templates is now available

Open shehrozeee opened this issue 3 years ago • 8 comments

Added the ability to debug templates is now available the template is saved to a temp folder and that is set as the project folder. however you have to delete it manually for clean up later on. The csharp scripting has been updated because I was using some features of the newer version that were not available in the previous versions.

shehrozeee avatar Oct 28 '21 07:10 shehrozeee

Hi, thanks for PR! I find it super useful. I've made some commets, please review

adoconnection avatar Oct 28 '21 16:10 adoconnection

Hi, thanks for PR! I find it super useful. I've made some commets, please review

Can you please point me to the "comments". I don't know where to find them.

shehrozeee avatar Oct 28 '21 17:10 shehrozeee

Strange, for me they are displayed right here, and in chenged files like so: image

image

adoconnection avatar Oct 28 '21 18:10 adoconnection

Looks like I dont get to see those comments for some reason image

shehrozeee avatar Oct 28 '21 18:10 shehrozeee

How do you propose to return both streams without introducing any breaking changes ?

shehrozeee avatar Oct 28 '21 18:10 shehrozeee

Strange, for me they are displayed right here, and in chenged files like so: image

image

but I guess the only place where the CreateAndCompileToStream function is used is only in this project itself so we can make this change.

shehrozeee avatar Oct 28 '21 18:10 shehrozeee

right, since CreateAndCompileToStream is private, we can change it

adoconnection avatar Oct 28 '21 18:10 adoconnection

        private class CompiledStreams
        {
            public MemoryStream assembly {get;set;}
            public MemoryStream pdb {get;set;}
        }

does something like this work as the return type ?

shehrozeee avatar Oct 28 '21 18:10 shehrozeee

Any progress on this? Not being able to debug templates was one of our big gripes with the legacy RazorTemplateEngine.NetCore that we're about to migrate from

hughesjs avatar Nov 14 '22 21:11 hughesjs

I close this pull request as its merged as part of #111 🚀🚀🚀

adoconnection avatar Nov 17 '23 16:11 adoconnection