Intercepting browser requests with Postman

If you are doing any kind of rest api development you probably have heard of Postman. Long story short, it is a Chrome extension which allows you to send http requests in a very easy and intuitive way. Apart from that (and many other features), it also allows you to intercept browser request. As this feature is very easy to overlook, here is a simple guide how to use it.
In the Postman window, click little satellite look-like button and toggle the “Interceptor” switch
Postman switch interceptor
Postman will ask you to install additional plugin called Postman Interceptor
Install
Once you click “Install” you will be redirected to Chrome Web Store where you can add the plugin to the browser. After successful installation you will see additional icon in Chrome menu bar. Click it and toggle “Request capture” switch
CaptureEnabled
When you go back to Postman and toggle again “Interceptor” button, it will be synchronized with Postman Interceptor plugin
InSync
and from now on, requests sent by browser will be visible in requests history
Interception
where you will be able to modify and resend them.

Intercepting browser requests with Postman

Generating PDB files with Resharper

The majority of the libraries developers use in their projects these days are open source. So in case something crashes inside third party library or you just want to know how it works, it is possible to get the PDB files from Microsoft Symbols Servers and debug it. If for some reasons PDB cannot be found on the servers, you can always grab the source code from GitHub and add to your project manually. Unfortunately when you use commercial libraries, it is impossible to do any of the previous steps. Luckily with Resharper you are able to generate PDB files from assembly and use it later in Visual Studio to debug it.
Let’s assume we would like to generate PDB files for EntityFramework. First of all, we have to locate EntityFramework assembly in Assembly Explorer. Go to Solution Explorer, RMB click on assembly you are interested in and select View in Assembly Explorer.
ViewInAssemblyExplorer
In Assembly Explorer once again RMB click on EntityFramework and select “Generate Pdb…
GeneratePdbFileMenu
In the opened window, select the destination folder for the files.
GeneratedPdbsOption
Once you click “Generate“, Resharper will process the assembly and generate PDBs.
PdbGenerated
Once the files are generated we have to tell Visual Studio to use them. In order to do that, run the app and stop the execution with some breakpoint, then go to Debug->Windows-> Modules, locate EntityFramework.dll, click it with RMB, select “Load Symbols” and choose file(s) generated by Resharper.
LoadSymbols
A this point we have PDB files ready but we are not able to set any breakpoint as we don’t have source code of EntityFramework. Fortunately Resharper once again saves the day as it is able to navigate to decompiled sources. Just make sure that your settings (Resharper->Options->External Sources) are the same as in the picture below
decompile
and you can navigate to external libraries’ source code just like they were in your project. The very last step is to disable “Enable Just My Code” option in Tools->Options->Debugging->General
JustMyCode
and from now on you can debug the external library
DbContextDebugging

Generating PDB files with Resharper