question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebSPA is not running on debug mode in visual studio 2019

See original GitHub issue

I noticed when hit F5 to debug eshoponcontainer the following events happen: 1- It builds an image with dev tag 2- WebSPA browsing is failed

After struggling, I Found the reason which is: 1- When a docker-compose build happen the following command is executed:

docker-compose -f "D:\SC\eShopOnContainers\src\docker-compose.yml" -f "D:\SC\eShopOnContainers\src\docker-compose.override.yml" -f "D:\SC\eShopOnContainers\src\docker-compose.vs.debug.yml" -p dockercompose2985742593939684029 --no-ansi config

As you can see docker-compose.vs.debug.yml will override the original and if you open this file in WebSPA part you can see: Targe:base, as well as this if you open cli on WebSPA container and execute node -v there is not proper result! So my suggestion was to install nodejs in base layer and This resolved the issue: ARG NODE_IMAGE=node:12.0 FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base WORKDIR /app COPY Web/WebSPA/Client/package.json . COPY Web/WebSPA/Client/package-lock.json . #I added this part RUN apt-get update RUN apt-get -y install curl gnupg RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - RUN apt-get -y install nodejs RUN npm install RUN npm -v EXPOSE 80

My question: Is this a bug in the source file?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sughosneocommented, Sep 2, 2021

Thank you @PSepah for sharing the details again. It has been documented under WebSPA project doesn’t come up on debug mode in Visual Studio 2019

I am closing this issue as of now. Please feel free to reopen if needed.

1reaction
PSepahcommented, Aug 30, 2021

Ah I see. Glad to hear that it has been resolved now. Would you like to share the steps? We can add that to the wiki page for everyone to refer in the future.

Yes of course! In fact, I explained the steps in the first message which is: My suggestion is to install nodejs in the base layer and this resolved the issue: …\eShopOnContainers\src\Web\WebSPA\Dockerfile: - ARG NODE_IMAGE=node:12.0 - FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base - WORKDIR /app - COPY Web/WebSPA/Client/package.json . - COPY Web/WebSPA/Client/package-lock.json . - #I added this part - RUN apt-get update - RUN apt-get -y install curl gnupg - RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - RUN apt-get -y install nodejs - RUN npm install - RUN npm -v - EXPOSE 80 As well as this change: webspa: environment: - ASPNETCORE_ENVIRONMENT=Implement to webspa: environment: - ASPNETCORE_ENVIRONMENT=Development In: docker-compose.override.yml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable debugging for ASP.NET apps - Visual Studio
Select the Debug tab and click the link to open the Open debug launch profiles UI. The UI presented corresponds to the settings...
Read more >
Error: Unable to Start Debugging on the Web Server
The microsoft visual studio remote debugging monitor(msvsmon.exe) does not appear to be running on the remote computer · If you are debugging on ......
Read more >
Microsoft Visual Studio 2019 doesn't DEBUG or RUN
1 Answer 1 ... You could try right clicking the project in the solution explorer toolbar, then selecting "set as startup project". This...
Read more >
Proficy Webspace 2023 - User Guide
Running the client in loose windows mode (embed=false). ... as Key Macro Editor, Visual Basic Editor, Startup Profile Manager, and others) will not...
Read more >
Debugging in Visual Studio Code
VS Code maintains a debug session while the program is running, and pressing the Stop button terminates the program. Tip: The Run action...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found