I'm debugging some code contained in a cshtml file, within an MVC application. If I put a deliberate error in the code, then Visual Studio (2010) gives me the option to break on that line, at which point I can watch local variables etc. The file at this point is tagged as [dynamic].
I would like to put a breakpoint in the file without having to break the code with a deliberate error, and I thought it was possible to get up a list of currently loaded (dynamic) files and put a breakpoint in one of them, but if I search on such things as "dynamic" and "cshtml" I get nowhere.
I suspect this should be easy, but I can't work out how to do it! Hoping you can help.
Aha! The Solution Explorer has a list of currently-loaded scripts in the Solution Explorer, under "Script Documents". I tried looking there but couldn't find my code because it is contained in a file named Index.cshtml, but is within an MVC view named something else, and that's the name listed in the solution explorer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With