I add two class libraries to the "solution".
I am running debugging.
Chrome starts up.
In Chrome, the start page `\Home\Index.cshtml` appears.
After `~10` seconds, debugging automatically stops.
Description.
I created a project - `WebApplCore`;
I added a class library to the solution - `Models`;
I added a class library to the solution - `DBRepository`.
Project `WebApplCore` - ASP.NET Core;
Class Library `Models`, `DBRepository` - Net.Standard 2.0.
Conditional notations for "tests":
- "+" - `project` is included in the `decision`;
- "-" - `project` is not included in the `decision`.
Test 1.
WebApplCore - "+";
Models - "+";
DBRepository - "-". Result: debugging works stably. Turning off debugging does not occur.
Test 2.
WebApplCore - "+";
Models - "-";
DBRepository - "+". Result: debugging works stably. Turning off debugging does not occur.
Test 3. !!!
WebApplCore - "+";
Models - "+";
DBRepository - "+". Result: debugging does not work stably !!!. After ~10 seconds, debugging automatically stops.
Question.
Why in **Test 3.!!!** does debugging turn off?
Picture-1
Picture-2
Picture-3
Picture-4
Picture-5
Update-1
I did not add references to the `Models`,` DBRepository` libraries in the `WebApplCore` project.
Project - `WebApplCore` is a" launchable project "
No. the Visual Studio debugger works fine and has for many many years. All you have to do is start the debugger on the main project. The project references will allow you to step though the libraries. Very very simple.
Do NOT set library projects as debug start up projects. Your web application is the startup project.
No. the Visual Studio debugger works fine and has for many many years. All you have to do is start the debugger on the main project. The project references will allow you to step though the libraries. Very very simple.
Do NOT set library projects as debug start up projects. Your web application is the startup project.
See "Update-1"
I correctly understood your answer?
See "Update-1"
I correctly understood your answer?
frmasp897654
Update-1
I did not add references to the `Models`,` DBRepository` libraries in the `WebApplCore` project.
Project - `WebApplCore` is a" launchable project "
The web application or any project cannot magically use a library if the library is not references.
The web application or any project cannot magically use a library if the library is not references.
I do not understand you.
I know how to connect libraries.
I have a problem: "debugging is interrupted", but not with connecting libraries.
I tried various combinations: with adding links to libraries and without adding links to libraries, but "debugging" only works if there is only one library in the "solution" "included" and it doesn’t matter if links to this library are added or not.
Could you be more explicit about what you mean with "debugging" stops. For example if you set a breakpoint into the library code dio you see a paricular message on this breakpoint ?
I tried various combinations: with adding links to libraries and without adding links to libraries, but "debugging" only works if there is only one library in the "solution" "included"
Simply not true. Share your project on GitHub if you need community assistance.
From your screenshots of the project structure , it seems your web app doesn't refer to the things from the class libraries since there is nothing in your class libraries.
You could try to check the debug logs in Output window .
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
10 Points
29 Posts
If you connect two libraries, then debugging does not work?
Apr 12, 2020 11:56 AM|frmasp897654|LINK
I add two class libraries to the "solution".





I am running debugging.
Chrome starts up.
In Chrome, the start page `\Home\Index.cshtml` appears.
After `~10` seconds, debugging automatically stops.
Description.
I created a project - `WebApplCore`;
I added a class library to the solution - `Models`;
I added a class library to the solution - `DBRepository`.
Project `WebApplCore` - ASP.NET Core;
Class Library `Models`, `DBRepository` - Net.Standard 2.0.
Conditional notations for "tests":
- "+" - `project` is included in the `decision`;
- "-" - `project` is not included in the `decision`.
Test 1.
WebApplCore - "+";
Models - "+";
DBRepository - "-".
Result: debugging works stably. Turning off debugging does not occur.
Test 2.
WebApplCore - "+";
Models - "-";
DBRepository - "+".
Result: debugging works stably. Turning off debugging does not occur.
Test 3. !!!
WebApplCore - "+";
Models - "+";
DBRepository - "+".
Result: debugging does not work stably !!!. After ~10 seconds, debugging automatically stops.
Question.
Why in **Test 3.!!!** does debugging turn off?
Picture-1
Picture-2
Picture-3
Picture-4
Picture-5
Update-1
I did not add references to the `Models`,` DBRepository` libraries in the `WebApplCore` project.
Project - `WebApplCore` is a" launchable project "
All-Star
53081 Points
23648 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 12, 2020 01:46 PM|mgebhard|LINK
No. the Visual Studio debugger works fine and has for many many years. All you have to do is start the debugger on the main project. The project references will allow you to step though the libraries. Very very simple.
Do NOT set library projects as debug start up projects. Your web application is the startup project.
Member
10 Points
29 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 12, 2020 03:44 PM|frmasp897654|LINK
See "Update-1"
I correctly understood your answer?
All-Star
53081 Points
23648 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 12, 2020 04:23 PM|mgebhard|LINK
The web application or any project cannot magically use a library if the library is not references.
https://docs.microsoft.com/en-us/visualstudio/ide/managing-references-in-a-project?view=vs-2019
Member
10 Points
29 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 12, 2020 08:25 PM|frmasp897654|LINK
I do not understand you.
I know how to connect libraries.
I have a problem: "debugging is interrupted", but not with connecting libraries.
I tried various combinations: with adding links to libraries and without adding links to libraries, but "debugging" only works if there is only one library in the "solution" "included" and it doesn’t matter if links to this library are added or not.
All-Star
48570 Points
18079 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 12, 2020 08:34 PM|PatriceSc|LINK
Hi,
The library project is compiled in debug mode ?
Could you be more explicit about what you mean with "debugging" stops. For example if you set a breakpoint into the library code dio you see a paricular message on this breakpoint ?
All-Star
53081 Points
23648 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 12, 2020 09:53 PM|mgebhard|LINK
Simply not true. Share your project on GitHub if you need community assistance.
Contributor
2070 Points
606 Posts
Re: If you connect two libraries, then debugging does not work?
Apr 13, 2020 07:15 AM|Sherry Chen|LINK
Hi frmasp897654 ,
From your screenshots of the project structure , it seems your web app doesn't refer to the things from the class libraries since there is nothing in your class libraries.
You could try to check the debug logs in Output window .
Here is my working demo , you could refer to .
Best Regards,
Sherry
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.