Skip to content

VS Code Debugging Improvements #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 6, 2021
Merged

VS Code Debugging Improvements #56

merged 4 commits into from
Jan 6, 2021

Conversation

JohnCampionJr
Copy link
Contributor

This took some work but I feel like I created a real smooth developer experience for debugging both Vue and NET Core in VS Code.

I added a bit of code to the startup of the template to allow for a few arguments to be passed.

The vue-cli server mode can be passed.
Start mode is the same way it is usually done, with the C# Configure starting the NPM runner and attaching to it.
Attach mode is just attaching to an existing VueCli Server

A port parameter can be passed to make it easy to use different ports if needed.

Lastly, a kill parameter uses the same code in VueCliMiddleware to shut down any stray Vue Cli processes (I was having them get stuck kind of regularly).

Then, I completely reworked the launch and task files for VS Code. I really didn't like not being able to see the Vue Cli server launched in the background by the VueCliMiddleware

The .NET Core & Vue Server is what I'm most proudest of :)
It does this:

  • Builds C# project
  • After that completes, it launches the VueCli in a separate terminal (with the progress showing its build)
  • After that succeeds, it launches the C# project for debugging
  • Finally, it launches the Chrome task to start the Vue debugging.

You can see everything that's happening and it all happens in sequence.

The .NET Core Web launch config is similar to the original except I changed it to launch the Chrome debug config.

On both, I set it to turn off the numerous module load messages in the debug console.

So with one launch command, I get this
Screenshot 2021-01-05 233525

Also added forcekill to force existing dev-servers shutdown
These will allow for some new debugging options in VS Code
Allows both VS Code launched Vue-Cli server and internal .NET Core Launch.
@JohnCampionJr JohnCampionJr marked this pull request as ready for review January 6, 2021 04:44
@liborpansky liborpansky merged commit 44afe67 into SoftwareAteliers:master Jan 6, 2021
@liborpansky
Copy link
Contributor

I've just tested the new debug experience and looks pretty good! Well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants