2

Whenever it comes to this line, this error appears:

using (var client = new HttpClient())
{
    var json = await client.GetStringAsync("http://mvalivros.azurewebsites.net/api/livros");
    var livros = JsonConvert.DeserializeObject<List<Model.Livro>>(json);
    return livros;
}

A new tab appears in VS that says "Frame not in module."

It happens whenever the thread arrives at the using line.

Frame not in module

This is code complete...

using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace LivrosApp.ApiLivros
{
    public static class Api
    {
        public static async Task<IList<Model.Livro>> GetAsync()
        {
            using (var client = new HttpClient())
            {
                var json = await client.GetStringAsync("http://mvalivros.azurewebsites.net/api/livros");
                var livros = JsonConvert.DeserializeObject<List<Model.Livro>>(json);
                return livros;
            }
        }
    }
}

2 Answers2

2

Annoying when this happens!!
There is not one solution to this, have had this issue in past and few things you can try:

  1. Change linking options -->Clean -->build
  2. Change fast deployment --> build
  3. Make sure mdb files are been generated and switch debug info generation to all/pdb files and rebuild
  4. Exception settings -> Common Language Runtime Exceptions (should be ticked) If unticked tick the parent level so that everything below it is ticked
  5. Tools -> Options -> Debugging -> General -> Enable Just My Code (Ticked)
  6. If none of them works then try stepping over (F10) instead of step into (F11)

Hopefully atleast one solution works!!

Dakshal Raijada
  • 1,261
  • 8
  • 18
  • 1
    @DakshalRaijada I've tried all your suggestions and none of them has worked for me, do you have any other possible solutions? – Esteban Verbel Dec 11 '16 at 04:52
1

I had the same problem and it worked for me after I make the following change.

Go to Debug -> Exceptions -> Uncheck Common Language Runtime Exception

Source where I get the solution from: Debbuger doesn't work frame not in module.

Hedego
  • 276
  • 2
  • 12