-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance file management for easy debug access in hosted applications. #385
Comments
Hi Thomas, The whole concept of preserving a script file path for script hosting scenarios is problematic.
Thus the scenario you are asking for cannot be implemented in a managed way. What you can do is implement it in your app. You can use this "global dictionary" approach you suggested earlier. Or you can use .NET SymbolProvider to read the source information from the pdb file created for all scripts executed with debug symbols enabled. |
hm how i just could do it by automatically adding a original file comment to the source files (a loop over the source file folders and a file watcher). Cause i do not want to dig into what is the magic behind csscript. And on a error i just load the temp file with has now the //filename: comment in its first line. brutaly, not elegant but hey. Ok i am a pragmatic oldtimer (made in 1965) i follow the KISS pragma and the "better then nothing" paradigm. Ive also added a routine which adds all file in that source tree automatically and injects them into the main file. So i can now play with that source tree and get also the right filename on a error. What i suggest is to make this what i did transparent behind the scene. (on user wish of course). I was guessing it is possible to fill a dictionary with each file which is loaded by //css_include and friends. ... Anyhow, i got my things working, thanks again and have a nice day. :) |
LOL, I am glad you got what you wanted to achieve. |
If you work with a hosted application the error message shows up with the temporary file name which is not the real name.
for debugging purposes its more handy to get the original filename.
A workaround is currently to add a comment with the original filename to every code file.
You can then load the temporary copy by its temporary filename and try to find this comment.
It might be a enhancement to internally add a dictionary and the functionality to avoid this workaround.
So also in a hosted environment the real filename can be obtained.
The text was updated successfully, but these errors were encountered: