0

I got following problem:

Im sending AJAX request to method in MVC, during execution of the method Visual Studio breaks without throwing any exception, the last step is the one at the attached screen, after that one it breaks and doesnt go any further even to return line.

I tried to add additional test variable, for example: var test = ""; but it is not being recognized in this context as well, i got the same message before foreach loop. I dont have this variables defined anywhere else in the code.enter image description here

Jacek Dziurdzikowski
  • 2,015
  • 2
  • 13
  • 20
  • 1
    Did you try putting try catch block? Make sure your tempListOfCourCases isn't null? – User3250 May 10 '17 at 12:05
  • I tried, i put everything from this method inside try block and in catch im catching error. The try block stops executing at the same step and catched error is this: "Cannot obtain value of the local variable or argument because it is not available at this instruction pointer, possibly because it has been optimized away. System.Exception". The question about being null i think is wrongly asked at this point because the problem is that visual studio tells variable doesnt exist in current context, while it apparently exists. – Jacek Dziurdzikowski May 10 '17 at 12:19
  • 1
    Pls add this catched error to ur question. Should be easier for us to dig into the issue – User3250 May 10 '17 at 12:22
  • 1
    Pls have a look at this http://stackoverflow.com/a/25510994/4868839 and http://stackoverflow.com/a/8311370/4868839 – User3250 May 10 '17 at 12:23
  • It works! Thank you a lot! Not sure yet what it does right now but helps :) – Jacek Dziurdzikowski May 10 '17 at 12:33
  • 1
    Great! the second url has the answer why it works :). Still for future reference pls add exception u was getting in question. Thanks – User3250 May 10 '17 at 12:34

0 Answers0