Reputation: 744
How can I force debbuger in Visual Studio Code to step into method which is defined in project which I added reference to? I am referencing Encog library which is outside the working directory like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace>IDS_CS</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\encog-dotnet-core-master\encog-core-cs\encog-core-cs.csproj" />
</ItemGroup>
</Project>
Debugger starts and everything seems fine, however I cannot step into method which is implemented in the Encog librarye.
Any solution? Thanks!
Upvotes: 2
Views: 1509
Reputation: 933
In all of your *.csproj
(C# project) files that you want to debug in vs-code, be sure to add the <DebugType>portable</DebugType>
in a <PropertyGroup>
option. Below is a snippet of how I have all of my *.csproj
files setup. After doing this I was able to debug step-into the main web application as well as any of the code referenced from one of my other projects to support separation of concerns: my logic lair layer :) vs. my model layer vs. my data layer, etc.
In all your *.csproj
files:
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DebugType>portable</DebugType>
</PropertyGroup>
A bit more info can be found here if you have project.json
files instead of *.csproj
files.
Upvotes: 2