DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. What to Do When Visual Studio 2017 Debugger Won’t Attach to Docker

What to Do When Visual Studio 2017 Debugger Won’t Attach to Docker

I’m not sure if that’s the right solution, but since I was unable to find any other reference to this problem (let alone a solution), I wanted to write it down.

Dror Helper user avatar by
Dror Helper
·
Mar. 12, 17 · Opinion
Like (1)
Save
Tweet
Share
8.89K Views

Join the DZone community and get the full member experience.

Join For Free

We’ve been developing .NET Core micro-services for a few months. Obviously, we’ve decided to use Docker for Windows for deployment.

Don’t get me wrong — I still find the experience amazing. Write code and immediately debug your code running on Docker. It got to a point I no longer think about this amazing integration; write on Windows, deploy on Linux, and it just works.

It’s been a fun but a rocky ride. From time to time, we’ll get an update to Visual Studio, Docker, or both. Usually, it didn’t break anything, but when it did, it was very frustrating for the whole team.
The last hitch happened today when I needed to show something to a fellow developer. I pressed F5 like I always do and as I was preparing for a quick debug session, something bad happened, I got an error dialog claiming:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use Microsoft.NETCoreApp 1.0.0 or newer. This may be expected if the target process did not run .NET code.

Since it worked yesterday (or at least the day before that), I’ve started thinking what could have caused this issue. I’ve found several suspects — Windows updated, Docker updated, Visual Studio released — in other words, everything that happened to my machine could be responsible (up to and including solar winds and Bigfoot).

I’ve tried updating the project NuGet references (not sure why) and checked with the other developers. Some didn’t install the latest and greatest (again not sure why). The conclusion was that all of our machines failed to debug the project we’ve been working on for the last two months.

So, it might be a bug in the project. Nope again! I’ve tried creating a new dummy project and found the same result.

Luckily, my co-worker took the time to read Visual Studio’s output window and found the following:

dockerissue
And then, something clicked in my head. Docker’s virtual machine was not updated for some reason. MobyLinuxVM, which Docker used to run our code, used an old .NET Core from our project — and since it could not run the code, we could not debug it.

But how can you update .NET Core on a virtual Linux machine? I still don’t have any idea. Instead, what we’ve ended up doing is go into Docker settings and cause it to rebuild the virtual machine by using Reset to factory defaults… as shown below:

resetdockerOnce MobyLinuxVM was re-created, debugging started working again.

I’m not sure if that’s the right solution, but since I was unable to find any other reference to this problem (let alone a solution), I wanted to write it down.

If you know of a better solution, please let me know.

And until then, happy coding!

Docker (software) .NET

Published at DZone with permission of Dror Helper, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Memory Debugging: A Deep Level of Insight
  • Explainer: Building High Performing Data Product Platform
  • Debugging Threads and Asynchronous Code
  • Why It Is Important To Have an Ownership as a DevOps Engineer

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: