One thing that you didn't mention on your text, but could help others is that we need to map the source directory for a proper debug session by adding the sourceFileMap property in the launch.json file.
In the example above I used a multi stage dockerfile, and the application was build on the /src folder. This causes the PDB files to reference such folder. By doing the sourceFileMap, we can translate the /src folder to our real source code directory.
sourceFileMap: To debug programs built on computers other than the Visual Studio code computer, Visual Studio code needs to be hold how to map file paths. So, for example, if you are debugging 'ExampleProject' which was built in your home directory on the Linux server, and now you have the same code open in Visual Studio code, this rule tells the debugger to change any file paths that it sees in '/home/ExampleAccount/ExampleProject' and replace it with the open directory.
I just submitted a change to include it in the Wiki Page.
Hi, my name’s Aaron Powell and I’m a Cloud Advocate at Microsoft. My area of specialty is front-end web dev and .NET (especially F#), but I enjoy doing silly things with technology.
Excellent post, congratulations!
One thing that you didn't mention on your text, but could help others is that we need to map the source directory for a proper debug session by adding the sourceFileMap property in the launch.json file.
In the example above I used a multi stage dockerfile, and the application was build on the /src folder. This causes the PDB files to reference such folder. By doing the sourceFileMap, we can translate the /src folder to our real source code directory.
This is what the OmniSharp docs says about it:
I just submitted a change to include it in the Wiki Page.
Great tip!