Recently I was working on a Yeoman generator to easily stub out a Node.js web server locally that can serve HTTPS requests: generator-nodehttps.
I built this using Visual Studio Code and wanted to set it up so I could easily debug the generator while I was building it, setting breakpoints and the like. Always nice to have breakpoints, watches, call stacks and the ability to step through your code when you hit F5, right?
The VSCode site has a great explination on how to setup debugging for a Node.js application which applies to my goal beacuse Yeoman is built on Node. Check that out first…
The trick is how you configure the launch.json
file within your project in Visual Studio Code to run Yeoman in debug mode. The way you do this is to make sure you tell Node to startup the Yeoman process on your machine, then pass in each argument you want it to call. Here’s what I used to make it work:
Now just set a breakpoint & hit F5 for some VSCode debugging goodness.
comments powered by DisqusBLOG POST CATEGORIES
- Angular
- Azure
- AzureAD
- Blogging
- CMS
- Critical Path Training
- Current Events
- DXCore CoreRush Refactor
- Development
- Docker
- ECM
- Events
- Football (US)
- Hugo
- JavaScript
- Kerrb
- MCMS 2002
- MS-600
- MacOS
- Me
- Media Center
- Microcontrollers
- Microsoft 365
- Microsoft Cloud Show
- Microsoft Graph
- Microsoft Teams
- Musings
- NgOfficeUiFabric
- Node.js
- Orchard
- Personal Projects
- Photography
- Pluralsight
- Presentation
- Publication
- RaspberryPi
- React
- SPA
- SharePoint
- SharePoint 2003
- SharePoint 2007
- SharePoint 2010
- SharePoint 2013
- SharePoint Framework
- Silverlight
- TechEd
- Technology
- Testimonials
- Virtualization
- Voitanos
- Vue.js
- WCM
- Windows Phone
- Workflow
- dotNET