Skip to main content

Notifications

Dynamics 365 Community / Blogs / Dynamics NAVAX / How to Debug Dynamics 365 e...

How to Debug Dynamics 365 eCommerce

Munib Profile Picture Munib 2,500
Our team has been doing some development with the new eCommerce. One of the things we had to figure out was how to debug.
To debug client side javascript, you can use Chrome Inspect and dig into the javascript. If you want to debug the server side TypeScript code then you need to do that on a development box. Set your self up, as I assume you already know how to get started with development and you got it to run via yarn start.

In VS Code, install Debugger for Chrome extension.

Call yarn start to run your project
Click on Run > Start Debugging


If it is the first time debugging, then it will auto generate a launch.json file under .vscode folder.
Most of it should be there. Just add the node part of the configuration. 
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version""0.2.0",
    "configurations": [
        {
            "type""node",
            "request""lanch",
            "name""Launch Program",
            "program""${workspaceFolder}/app.js"
        },
        {
            "type""chrome",
            "request""launch",
            "name""Launch Chrome against localhost",
            "url""https://localhost:4000/_sdk/allmodules",
            "webRoot""${workspaceFolder}"
        }
    ]
}

Now you can start debugging. Put your breakpoints and be more productive.
 

Comments

*This post is locked for comments

  • Community Member Profile Picture Community Member Microsoft Employee
    Posted at
    Hi eCommerce guys, below some useful links about the new eCommerce solution: Getting Started with eCommerce
  • Community Member Profile Picture Community Member Microsoft Employee
    Posted at
    Hi eCommerce guys, below some useful links about the new eCommerce solution: Getting Started with eCommerce
  • Community Member Profile Picture Community Member Microsoft Employee
    Posted at
    Hi eCommerce guys, below some useful links about the new eCommerce solution: Getting Started with eCommerce