- Creating Your First Debug Configuration
- What we’ll cover
- Exploring the features of the built in debugging tools
- Learn how VS Code tracks debug configuration
- Create and run a debug configuration for Client Side JavaScript
- Resources
- Pro Tips
- True debugging is much more efficient than using console.log() statements. Spent the time to learn the tools and it will make you a better developer.
- What we’ll cover
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}- Debug Configurations for Server Side JavaScript (Node.js)
- What we’ll cover
- Create and run a debug configuration for Server Side JavaScript
- Resources
- What we’ll cover
Launch Node (replace program with your server file)
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/app.js"
}Attach to Process (you will need to run your application first with node --inspect server.js)
{
"type": "node",
"request": "attach",
"name": "Attach by Process ID",
"processId": "${command:PickProcess}"
}Attach to Port (you will need to run your application first with node --inspect server.js)
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229
}Attach to Port using Nodemon (you will need to run your application first with nodemon --inspect server.js)
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"restart": true
}- Debugging Angular CLI Applications
- What we’ll cover
- Create and run a debug configuration Angular
- Resources
- What we’ll cover
Angular CLI Applications (you will need to start your Angular app yourself with npm start or ng serve)
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost for Angular",
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}"
}- Debugging Create React App Applications
- What we’ll cover
- Create and run a debug configuration Angular
- Resources
- What we’ll cover
Create React App Applications (you will need to start your app with npm start)
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost for React",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/src"
}- Debugging Vue CLI Applications
- What we’ll cover
- Create and run a debug configuration Angular
- Resources
- What we’ll cover
Vue CLI Applications (you will need to start your app with npm start)
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///src/*": "${webRoot}/*"
}
}