Ad code

How to Debug Dynamics 365 eCommerce

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:
    "configurations": [
            "name""Launch Program",
            "name""Launch Chrome against localhost",

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

Post a Comment